WordPress.org

Plugin Directory

Changeset 606302


Ignore:
Timestamp:
09/30/12 22:28:52 (19 months ago)
Author:
bainternet
Message:

added post by email limitation

Location:
author-category
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • author-category/trunk/author-category.php

    r605837 r606302  
    44Plugin URI: http://en.bainternet.info 
    55Description: simple plugin limit authors to post just in one category. 
    6 Version: 0.4 
     6Version: 0.5 
    77Author: Bainternet 
    88Author URI: http://en.bainternet.info 
     
    5252            //xmlrpc post insert hook and quickpress 
    5353            add_filter('xmlrpc_wp_insert_post_data', array(&$this, 'user_default_category'),2); 
    54             add_filter('pre_option_default_category',array(&$this, 'user_default_category_option')); 
     54            add_filter('r',array(&$this, 'user_default_category_option')); 
     55 
     56            //post by email cat 
     57            add_filter( 'publish_phone',array($this,'post_by_email_cat')); 
     58 
    5559            //plugin links row 
    5660            add_filter( 'plugin_row_meta', array($this,'_my_plugin_links'), 10, 2 ); 
     
    99103            } 
    100104            return $post_data; 
     105        } 
     106 
     107        /** 
     108         * post_by_email_cat  
     109         *  
     110         * @author Ohad   Raz 
     111         * @since 0.5 
     112         *  
     113         * @param  int $post_id  
     114         * @return void 
     115         */ 
     116        public function post_by_email_cat($post_id){ 
     117            $p = get_post($post_id); 
     118            $cat = $this->get_user_cat($p['post_author']); 
     119            if ($cat){ 
     120                $email_post = array(); 
     121                $email_post['ID'] = $post_id; 
     122                $email_post['post_category'] = array($cat); 
     123                wp_update_post($email_post); 
     124            }            
    101125        } 
    102126 
  • author-category/trunk/readme.txt

    r605837 r606302  
    55Requires at least: 3.0 
    66Tested up to: 3.4.2 
    7 Stable tag: 0.4 
     7Stable tag: 0.5 
    88 
    99simple lightweight plugin limit authors to post just in one category. 
     
    2020*   Removes category metabox for selected users. 
    2121*   Removed categories from quick edit for selected users. 
     22*   Option to clear selection.(new) 
     23*   multiple categories per user.(new) 
    2224 
    2325 
     
    4951 
    5052== Changelog == 
     530.5 
     54Added post by mail category limitation. 
     55 
    51560.4 
    5257Added support for multiple categories per user. 
Note: See TracChangeset for help on using the changeset viewer.