Plugin Directory

Changeset 571470


Ignore:
Timestamp:
07/12/2012 09:31:11 PM (14 years ago)
Author:
alyssonweb
Message:

Version 1.0.2

Location:
dynamics-sidebars
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • dynamics-sidebars/tags/1.0.2/includes/class-dynamic-sidebars.php

    r571073 r571470  
    7171        if ( is_admin() ) {
    7272            // Hook up actions
    73             // add_action( 'init', array( &$this, 'init' ), 0 );
    7473            add_action( 'init', array( &$this, 'register_column' ), 100 );
    7574            add_action( 'init', array( &$this, 'register_sidebars' ), 11 );
     
    8483
    8584        // hook
    86         do_action( 'ds_construct', &$this );
     85        do_action( 'ds_init', &$this );
    8786    }
    8887
  • dynamics-sidebars/tags/1.0.2/readme.txt

    r571073 r571470  
    1010Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6NTZTQUPXP8F2
    1111
    12 Create a custom (dynamic) widget area (sidebar) to pages, posts and custom post types.
     12Have a custom sidebar (widget area) for every pages, posts and/or custom post types.
    1313
    1414
    1515== Description ==
    1616
    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.
     17Want your pages, posts and/or custom post types to have differents sidebars?
     18An awesome plugin that let you have a different and custom sidebar (widget area) for every page, post and/or custom post type.
    2019
    2120**Usage**
     21
     22By 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
     29In order to user this plugin features with your custom post type you must add a feature suppport to it.
     30Do it by doing this:
     31
     32On 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
     43When 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
     53To remove support from pages, posts and/or custom post type do like so:
     54On 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***
    2270
    2371`<?php
     
    54102?>`
    55103
    56 **Remove from poge/post or custom post type**
    57 
    58 `<?php
    59     remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts
    60     remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages
    61     remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp
    62 ?>`
    63 
    64104**Don't forget to check the 'Other Notes' tab for a list of all function and hook you can use.**
    65105
     
    102142
    103143* Api: has_sidebar()
    104 * Action: ds_init
    105144* Action: ds_plugin_deactivate
    106145* Action: ds_register_column
     
    114153* REMOVED Constant: DS_PLUGIN_FOR_PAGES, to render or not "Sidebar" metabox for pages
    115154* REMOVED Constant: DS_PLUGIN_FOR_POSTS, to render or not "Sidebar" metabox for posts
     155* CHANGED Action 'ds_construct' to 'ds_init'
    116156
    117157= 1.0.0 =
     
    135175* Action: ds_plugin_install
    136176* Action: ds_plugin_uninstall
    137 * Action: ds_construct
    138177* Action: ds_add_metabox
    139178* Action: ds_render_metabox
     
    184223* ds_plugin_uninstall
    185224* ds_plugin_deactivate
    186 * ds_construct
     225* ds_init
    187226* ds_add_metabox
    188227* ds_render_metabox
    189228* ds_save
    190 * ds_init
    191229* ds_register_column
    192230
  • dynamics-sidebars/trunk/includes/class-dynamic-sidebars.php

    r571073 r571470  
    7171        if ( is_admin() ) {
    7272            // Hook up actions
    73             // add_action( 'init', array( &$this, 'init' ), 0 );
    7473            add_action( 'init', array( &$this, 'register_column' ), 100 );
    7574            add_action( 'init', array( &$this, 'register_sidebars' ), 11 );
     
    8483
    8584        // hook
    86         do_action( 'ds_construct', &$this );
     85        do_action( 'ds_init', &$this );
    8786    }
    8887
  • dynamics-sidebars/trunk/readme.txt

    r571073 r571470  
    55Requires at least: 3.0
    66Tested up to: 3.4.1
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6NTZTQUPXP8F2
    1111
    12 Create a custom (dynamic) widget area (sidebar) to pages, posts and custom post types.
     12Have a custom sidebar (widget area) for every pages, posts and/or custom post types.
    1313
    1414
    1515== Description ==
    1616
    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.
     17Want your pages, posts and/or custom post types to have differents sidebars?
     18An awesome plugin that let you have a different and custom sidebar (widget area) for every page, post and/or custom post type.
    2019
    2120**Usage**
     21
     22By 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
     29In order to user this plugin features with your custom post type you must add a feature suppport to it.
     30Do it by doing this:
     31
     32On 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
     43When 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
     53To remove support from pages, posts and/or custom post type do like so:
     54On 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***
    2270
    2371`<?php
     
    54102?>`
    55103
    56 **Remove from poge/post or custom post type**
    57 
    58 `<?php
    59     remove_post_type_support( 'post', 'custom-sidebar' ); // to remove from posts
    60     remove_post_type_support( 'page', 'custom-sidebar' ); // to remove from pages
    61     remove_post_type_support( 'custom post type', 'custom-sidebar' ); // to remove from ctp
    62 ?>`
    63 
    64104**Don't forget to check the 'Other Notes' tab for a list of all function and hook you can use.**
    65105
     
    99139== Changelog ==
    100140
     141= 1.0.2 =
     142
     143* CHANGED Action 'ds_construct' to 'ds_init'
     144
    101145= 1.0.1 =
    102146
    103147* Api: has_sidebar()
    104 * Action: ds_init
    105148* Action: ds_plugin_deactivate
    106149* Action: ds_register_column
     
    135178* Action: ds_plugin_install
    136179* Action: ds_plugin_uninstall
    137 * Action: ds_construct
    138180* Action: ds_add_metabox
    139181* Action: ds_render_metabox
     
    157199== Upgrade Notice ==
    158200
    159 Fixed deactivation hook deleting all data and added some other features.
     201Changed Action 'ds_construct' to 'ds_init'
    160202
    161203
     
    184226* ds_plugin_uninstall
    185227* ds_plugin_deactivate
    186 * ds_construct
     228* ds_init
    187229* ds_add_metabox
    188230* ds_render_metabox
    189231* ds_save
    190 * ds_init
    191232* ds_register_column
    192233
Note: See TracChangeset for help on using the changeset viewer.