Plugin Directory

Changeset 944333


Ignore:
Timestamp:
07/07/2014 12:42:37 PM (12 years ago)
Author:
kaisercrazy
Message:

Version 0.2

Location:
auto-files/trunk
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • auto-files/trunk/autofiles.php

    r901853 r944333  
    33Plugin Name: Auto Files
    44Plugin URI: http://wpadami.com/cms-sistemleri/wordpress/auto-files-mini-bir-auto-attachments.html
    5 Description: This plugin is minified version of Auto Attachments. Supported attachment types are Word, Excel, Pdf, PowerPoint, zip, rar, tar, tar.gz 
    6 Version: 0.1
     5Description: This plugin is minified version of Auto Attachments. Supported attachment types are Word, Excel, Pdf, PowerPoint, zip, rar, tar, tar.gz
     6Version: 0.2
    77Author: Serkan Algur
    88Author URI: http://www.wpadami.com
     
    1515}
    1616
    17 // CSS Style Loading 
     17// CSS Style Loading
    1818if (!is_admin()){
    1919    wp_enqueue_style('autofilesstyle', plugins_url('/auto-files/autofiles.css'), __FILE__ );
    2020}
     21function multilingual_af( ) {
     22                load_plugin_textdomain('autof', false, dirname(plugin_basename(__FILE__)) . '/languages');
     23}
     24add_action('init', 'multilingual_af');
    2125
     26include('metaboxes.php');
    2227
    2328function autof_show_files() {
     
    6368            $filehtml .= "</div>";
    6469        }
    65         $filehtml .="</div>";       
     70        $filehtml .="</div>";
    6671        $filehtml .="<div class='clear'> </div>";
    6772        return $filehtml;
    68     } 
     73    }
    6974}
    7075
    7176add_filter('the_content', 'autof_insertintoContent');
    7277function autof_insertintoContent($content) {
     78    global $post;
     79    $metapost = get_post_meta($post->ID,'aa_post_meta',TRUE);
     80    $metapage = get_post_meta($post->ID,'aa_page_meta',TRUE);
    7381        if (get_post_type() == 'post') {
    74             if (!post_password_required()){
    75                 $content .= autof_show_files();
    76                 return $content;
     82            if (!post_password_required() && $metapost['show'] == 'yes'){
     83                    $content .= autof_show_files();
     84                    return $content;
    7785            } else {
    7886                return $content;
    7987            }
    8088        }
    81        
     89
    8290        if (get_post_type() == 'page'){
    83             if (!post_password_required()){
    84                 $content .= autof_show_files();
    85                 return $content;
     91            if (!post_password_required() && $metapage['show'] == 'yes'){
     92                    $content .= autof_show_files();
     93                    return $content;
    8694            } else {
    8795                return $content;
  • auto-files/trunk/readme.txt

    r901853 r944333  
    3333== Changelog ==
    3434
     35= Version 0.2 =
     36* Users can hide Auto Files from page and posts. Users will find a metabox each page/post edit area.
     37* English and Turkish Language Added for metaboxes. (07.07.2014)
     38
    3539= Version 0.1 =
    3640* Plugin Released (24.04.2014)
Note: See TracChangeset for help on using the changeset viewer.