Changeset 571470
- Timestamp:
- 07/12/2012 09:31:11 PM (14 years ago)
- Location:
- dynamics-sidebars
- Files:
-
- 4 edited
- 1 copied
-
tags/1.0.2 (copied) (copied from dynamics-sidebars/trunk)
-
tags/1.0.2/includes/class-dynamic-sidebars.php (modified) (2 diffs)
-
tags/1.0.2/readme.txt (modified) (6 diffs)
-
trunk/includes/class-dynamic-sidebars.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dynamics-sidebars/tags/1.0.2/includes/class-dynamic-sidebars.php
r571073 r571470 71 71 if ( is_admin() ) { 72 72 // Hook up actions 73 // add_action( 'init', array( &$this, 'init' ), 0 );74 73 add_action( 'init', array( &$this, 'register_column' ), 100 ); 75 74 add_action( 'init', array( &$this, 'register_sidebars' ), 11 ); … … 84 83 85 84 // hook 86 do_action( 'ds_ construct', &$this );85 do_action( 'ds_init', &$this ); 87 86 } 88 87 -
dynamics-sidebars/tags/1.0.2/readme.txt
r571073 r571470 10 10 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6NTZTQUPXP8F2 11 11 12 Create a custom (dynamic) widget area (sidebar) to pages, posts andcustom post types.12 Have a custom sidebar (widget area) for every pages, posts and/or custom post types. 13 13 14 14 15 15 == Description == 16 16 17 Want your pages/posts or custom post types to have differents sidebar areas? This plugin is for you! 18 19 An awesome plugin to add custom (dynamic) widget area (sidebar) to your page, post or even custom post type. 17 Want your pages, posts and/or custom post types to have differents sidebars? 18 An awesome plugin that let you have a different and custom sidebar (widget area) for every page, post and/or custom post type. 20 19 21 20 **Usage** 21 22 By default it will add 'custom-sidebar' support for the following post types: 23 24 * Post 25 * Page 26 27 **Adding support for custom post type** 28 29 In order to user this plugin features with your custom post type you must add a feature suppport to it. 30 Do it by doing this: 31 32 On you 'functions.php' file 33 `<?php 34 add_action( 'after_setup_theme', 'theme_setup' ); 35 36 function theme_setup() 37 { 38 add_post_type_support( 'post_type', 'custom-sidebar' ); 39 // add another one here 40 } 41 ?>` 42 43 When you register your custom post type, on 'register_post_type' call. 44 @see http://codex.wordpress.org/Function_Reference/register_post_type for more information 45 46 `<?php 47 $args = array( 'supports' => array( 'custom-sidebar' ) ); 48 register_post_type( 'post_type', $args ); 49 ?>` 50 51 **Removing support for pages, posts and/or custom post types** 52 53 To remove support from pages, posts and/or custom post type do like so: 54 On you 'functions.php' file add this 55 56 `<?php 57 add_action( 'after_setup_theme', 'theme_setup' ); 58 59 function theme_setup() 60 { 61 remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts 62 remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages 63 remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp 64 } 65 ?>` 66 67 **Showing the sidebar** 68 69 ***Note you can use this wherever you like to show you sidebar*** 22 70 23 71 `<?php … … 54 102 ?>` 55 103 56 **Remove from poge/post or custom post type**57 58 `<?php59 remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts60 remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages61 remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp62 ?>`63 64 104 **Don't forget to check the 'Other Notes' tab for a list of all function and hook you can use.** 65 105 … … 102 142 103 143 * Api: has_sidebar() 104 * Action: ds_init105 144 * Action: ds_plugin_deactivate 106 145 * Action: ds_register_column … … 114 153 * REMOVED Constant: DS_PLUGIN_FOR_PAGES, to render or not "Sidebar" metabox for pages 115 154 * REMOVED Constant: DS_PLUGIN_FOR_POSTS, to render or not "Sidebar" metabox for posts 155 * CHANGED Action 'ds_construct' to 'ds_init' 116 156 117 157 = 1.0.0 = … … 135 175 * Action: ds_plugin_install 136 176 * Action: ds_plugin_uninstall 137 * Action: ds_construct138 177 * Action: ds_add_metabox 139 178 * Action: ds_render_metabox … … 184 223 * ds_plugin_uninstall 185 224 * ds_plugin_deactivate 186 * ds_ construct225 * ds_init 187 226 * ds_add_metabox 188 227 * ds_render_metabox 189 228 * ds_save 190 * ds_init191 229 * ds_register_column 192 230 -
dynamics-sidebars/trunk/includes/class-dynamic-sidebars.php
r571073 r571470 71 71 if ( is_admin() ) { 72 72 // Hook up actions 73 // add_action( 'init', array( &$this, 'init' ), 0 );74 73 add_action( 'init', array( &$this, 'register_column' ), 100 ); 75 74 add_action( 'init', array( &$this, 'register_sidebars' ), 11 ); … … 84 83 85 84 // hook 86 do_action( 'ds_ construct', &$this );85 do_action( 'ds_init', &$this ); 87 86 } 88 87 -
dynamics-sidebars/trunk/readme.txt
r571073 r571470 5 5 Requires at least: 3.0 6 6 Tested up to: 3.4.1 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6NTZTQUPXP8F2 11 11 12 Create a custom (dynamic) widget area (sidebar) to pages, posts andcustom post types.12 Have a custom sidebar (widget area) for every pages, posts and/or custom post types. 13 13 14 14 15 15 == Description == 16 16 17 Want your pages/posts or custom post types to have differents sidebar areas? This plugin is for you! 18 19 An awesome plugin to add custom (dynamic) widget area (sidebar) to your page, post or even custom post type. 17 Want your pages, posts and/or custom post types to have differents sidebars? 18 An awesome plugin that let you have a different and custom sidebar (widget area) for every page, post and/or custom post type. 20 19 21 20 **Usage** 21 22 By default it will add 'custom-sidebar' support for the following post types: 23 24 * Post 25 * Page 26 27 **Adding support for custom post type** 28 29 In order to user this plugin features with your custom post type you must add a feature suppport to it. 30 Do it by doing this: 31 32 On you 'functions.php' file 33 `<?php 34 add_action( 'after_setup_theme', 'theme_setup' ); 35 36 function theme_setup() 37 { 38 add_post_type_support( 'post_type', 'custom-sidebar' ); 39 // add another one here 40 } 41 ?>` 42 43 When you register your custom post type, on 'register_post_type' call. 44 @see http://codex.wordpress.org/Function_Reference/register_post_type for more information 45 46 `<?php 47 $args = array( 'supports' => array( 'custom-sidebar' ) ); 48 register_post_type( 'post_type', $args ); 49 ?>` 50 51 **Removing support for pages, posts and/or custom post types** 52 53 To remove support from pages, posts and/or custom post type do like so: 54 On you 'functions.php' file add this 55 56 `<?php 57 add_action( 'after_setup_theme', 'theme_setup' ); 58 59 function theme_setup() 60 { 61 remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts 62 remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages 63 remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp 64 } 65 ?>` 66 67 **Showing the sidebar** 68 69 ***Note you can use this wherever you like to show you sidebar*** 22 70 23 71 `<?php … … 54 102 ?>` 55 103 56 **Remove from poge/post or custom post type**57 58 `<?php59 remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts60 remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages61 remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp62 ?>`63 64 104 **Don't forget to check the 'Other Notes' tab for a list of all function and hook you can use.** 65 105 … … 99 139 == Changelog == 100 140 141 = 1.0.2 = 142 143 * CHANGED Action 'ds_construct' to 'ds_init' 144 101 145 = 1.0.1 = 102 146 103 147 * Api: has_sidebar() 104 * Action: ds_init105 148 * Action: ds_plugin_deactivate 106 149 * Action: ds_register_column … … 135 178 * Action: ds_plugin_install 136 179 * Action: ds_plugin_uninstall 137 * Action: ds_construct138 180 * Action: ds_add_metabox 139 181 * Action: ds_render_metabox … … 157 199 == Upgrade Notice == 158 200 159 Fixed deactivation hook deleting all data and added some other features. 201 Changed Action 'ds_construct' to 'ds_init' 160 202 161 203 … … 184 226 * ds_plugin_uninstall 185 227 * ds_plugin_deactivate 186 * ds_ construct228 * ds_init 187 229 * ds_add_metabox 188 230 * ds_render_metabox 189 231 * ds_save 190 * ds_init191 232 * ds_register_column 192 233
Note: See TracChangeset
for help on using the changeset viewer.