WordPress.org

Plugin Directory

Changeset 580004


Ignore:
Timestamp:
07/31/12 21:35:37 (21 months ago)
Author:
bainternet
Message:
 
Location:
custom-category-template
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • custom-category-template/trunk/category_template.php

    r540442 r580004  
    44Plugin URI: http://en.bainternet.info 
    55Description: This plugin lets you select a specific template for a category, just like pages 
    6 Version: 0.2 
     6Version: 0.3 
    77Author: Bainternet 
    88Author URI: http://en.bainternet.info 
     
    5050            //do the template selection 
    5151            add_filter( 'category_template', array($this,'get_custom_category_template' )); 
    52             //add extra fields to category edit form hook 
     52            //add extra fields to category NEW/EDIT form hook 
    5353            add_action ( 'edit_category_form_fields', array($this,'category_template_meta_box')); 
     54            add_action( 'category_add_form_fields', array( &$this, 'category_template_meta_box') ); 
     55             
     56             
    5457            // save extra category extra fields hook 
     58            add_action( 'created_category', array( &$this, 'save_category_template' )); 
    5559            add_action ( 'edited_category', array($this,'save_category_template')); 
     60            //plugin row links 
     61            add_filter( 'plugin_row_meta', array($this,'_my_plugin_links'), 10, 2 ); 
    5662            //extra action on constructor 
    5763            do_action('Custom_Category_Template_constructor',$this); 
     
    133139            return $category_template; 
    134140        } 
     141 
     142        /** 
     143         * _my_plugin_links 
     144         * @since 0.1 
     145         * @author Ohad Raz <admin@bainternet.info> 
     146         * @param  array $links  
     147         * @param  File $file   
     148         * @return array       
     149         */ 
     150        public function _my_plugin_links($links, $file) { 
     151            $plugin = plugin_basename(__FILE__);  
     152            if ($file == $plugin) // only for this plugin 
     153                    return array_merge( $links, 
     154                array( '<a href="http://en.bainternet.info/category/plugins">' . __('Other Plugins by this author' ) . '</a>' ), 
     155                array( '<a href="http://wordpress.org/support/plugin/custom-category-template">' . __('Plugin Support') . '</a>' ), 
     156                array( '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4MMGF5X3TM5L" target="_blank">' . __('Donate') . '</a>' ) 
     157            ); 
     158            return $links; 
     159        } 
    135160    }//end class 
    136161}//end if 
  • custom-category-template/trunk/readme.txt

    r540442 r580004  
    44Tags: category template, category, custom template, category theme 
    55Requires at least: 2.9.2 
    6 Tested up to: 3.3.2 
    7 Stable tag: 0.2 
     6Tested up to: 3.4.1 
     7Stable tag: 0.3 
    88 
    99This plugin lets you select a specific template for a category, just like pages 
     
    3939=I have Found a Bug, Now what?= 
    4040 
    41 Simply use the <a href=\"http://wordpress.org/tags/custom-category-template/?forum_id=10\">Support Forum</a> and thanks a head for doing that. 
     41Simply use the <a href=\"http://wordpress.org/support/plugin/custom-category-template\">Support Forum</a> and thanks a head for doing that. 
    4242== Screenshots == 
    4343 
     
    4646 
    4747== Changelog == 
     480.3 added template selection to add new category screen, plugin row links. 
     49 
    48500.2 fixed class name bug which caused a fatal error. 
    4951 
Note: See TracChangeset for help on using the changeset viewer.