{"id":15090,"date":"2011-09-28T21:37:46","date_gmt":"2011-09-28T21:37:46","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/dynamics-sidebars\/"},"modified":"2014-10-07T02:12:12","modified_gmt":"2014-10-07T02:12:12","slug":"dynamics-sidebars","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/dynamics-sidebars\/","author":1164391,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.7","stable_tag":"1.0.7","tested":"4.0.38","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Dynamics Sidebars","header_author":"Alysson Bortoli","header_description":"","assets_banners_color":"7a95c0","last_updated":"2014-10-07 02:12:12","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=6NTZTQUPXP8F2","header_plugin_uri":"","header_author_uri":"http:\/\/twitter.com\/akbortoli","rating":5,"author_block_rating":0,"active_installs":100,"downloads":13693,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>Fixed issue when trying to activate the plugin. (PHP 5.4)<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1002971","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.1.1","0.1.2","0.1.3","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7"],"block_files":[],"assets_screenshots":{"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1573780","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1573780","resolution":"1","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1573780","resolution":"2","location":"plugin"}},"screenshots":{"1":"Pages\/Posts\/Custom Post Types Edit Page","2":"Quick Edit","3":"Bulk Edit"}},"plugin_section":[],"plugin_tags":[527,16829,1506,168,162],"plugin_category":[43],"plugin_contributors":[83318,83317],"plugin_business_model":[],"class_list":["post-15090","plugin","type-plugin","status-closed","hentry","plugin_tags-custom","plugin_tags-different","plugin_tags-dynamic","plugin_tags-sidebar","plugin_tags-widget","plugin_category-customization","plugin_contributors-akbortoli","plugin_contributors-alyssonweb","plugin_committers-alyssonweb"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/dynamics-sidebars_7a95c0.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/dynamics-sidebars\/trunk\/screenshot-1.png?rev=1573780","caption":"Pages\/Posts\/Custom Post Types Edit Page"},{"src":"https:\/\/ps.w.org\/dynamics-sidebars\/trunk\/screenshot-2.png?rev=1573780","caption":"Quick Edit"},{"src":"https:\/\/ps.w.org\/dynamics-sidebars\/trunk\/screenshot-3.png?rev=1573780","caption":"Bulk Edit"}],"raw_content":"<!--section=description-->\n<p>With DS, it's possible to change the widgets that display in a sidebar (widgetized area) according to a context (for example, a specific page). Setting up a custom widget area to display across multiple conditions is as easy as a few clicks and code changes.<\/p>\n\n<p><a href=\"https:\/\/github.com\/alyssonweb\/wp-dynamics-sidebars\/wiki\">Documentation<\/a> | <a href=\"https:\/\/github.com\/alyssonweb\/wp-dynamics-sidebars\/issues\">Support Forum<\/a><\/p>\n\n<p><strong>Usage<\/strong><\/p>\n\n<p>By default it will add 'custom-sidebar' support for the following post types:<\/p>\n\n<ul>\n<li>Post<\/li>\n<li>Page<\/li>\n<\/ul>\n\n<p><strong>IMPORTANT: Showing the sidebar<\/strong><\/p>\n\n<p><strong><em>Note you can use this wherever you like to show you sidebar<\/em><\/strong><\/p>\n\n<pre><code>&lt;?php\n    dynamic_sidebar( get_the_sidebar() );\n?&gt;\n<\/code><\/pre>\n\n<p>Or<\/p>\n\n<pre><code>&lt;?php\n    $sidebar = get_the_sidebar();\n    if ( is_active_sidebar( $sidebar ) ) {\n        dynamic_sidebar( $sidebar );\n    }\n?&gt;\n<\/code><\/pre>\n\n<p><strong>Adding support for custom post type<\/strong><\/p>\n\n<p>In order to user this plugin features with your custom post type you must add a feature suppport to it.\nDo it by doing this:<\/p>\n\n<p>On you 'functions.php' file\n    <\/p>\n\n<p>When you register your custom post type, on 'register_post_type' call.<\/p>\n\n<p><a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/register_post_type\">Function Reference register_post_type<\/a> for more information<\/p>\n\n<pre><code>&lt;?php\n    $args = array( 'supports' =&gt; array( 'custom-sidebar' ) );\n    register_post_type( 'post_type', $args );\n?&gt;\n<\/code><\/pre>\n\n<p><strong>Removing support for pages, posts and\/or custom post types<\/strong><\/p>\n\n<p>To remove support from pages, posts and\/or custom post type do like so:\nOn you 'functions.php' file add this<\/p>\n\n<pre><code>&lt;?php\n    add_action( 'after_setup_theme', 'theme_setup' );\n\n    function theme_setup()\n    {\n        remove_post_type_support( 'post', 'custom-sidebar' ); \/\/ to remove from posts\n        remove_post_type_support( 'page', 'custom-sidebar' ); \/\/ to remove from pages\n        remove_post_type_support( 'custom post type', 'custom-sidebar' ); \/\/ to remove from ctp\n    }\n?&gt;\n<\/code><\/pre>\n\n<p><strong>Changing sidebar args<\/strong><\/p>\n\n<p>On your 'functions.php' file just add the following code.<\/p>\n\n<pre><code>&lt;?php\n    add_filter( 'ds_sidebar_args', 'my_sidebar_args', 1, 3 );\n\n    function my_sidebar_args( $defaults, $sidebar_name, $sidebar_id ) {\n        $args = array(\n            'description'   =&gt; \"$sidebar_name widget area\",\n            'before_widget' =&gt; '&lt;li id=\"%1$s\" class=\"widget-container %2$s\"&gt;',\n            'after_widget'  =&gt; '&lt;\/li&gt;',\n            'before_title'  =&gt; '&lt;h3 class=\"widget-title\"&gt;',\n            'after_title'   =&gt; '&lt;\/h3&gt;',\n        );\n\n        return $args;\n    }\n?&gt;\n<\/code><\/pre>\n\n<p><a href=\"https:\/\/github.com\/akbortoli\/wp-dynamics-sidebars\/wiki\">Documentation<\/a> | <a href=\"https:\/\/github.com\/akbortoli\/wp-dynamics-sidebars\/issues\">Support Forum<\/a><\/p>\n\n<p><strong>Don't forget to check the 'Other Notes' tab for a list of all function and hook you can use.<\/strong><\/p>\n\n<h3>Internationalization (i18n)<\/h3>\n\n<p>This plugin has been translated into the languages listed below:<\/p>\n\n<ul>\n<li>pt_BR - Portuguese Brazil.<\/li>\n<\/ul>\n\n<p>If you're interested in doing a translation into your language, please let me know.<\/p>\n\n<h3>Api<\/h3>\n\n<p><strong>Functions<\/strong><\/p>\n\n<ul>\n<li>has_sidebar( $post_id = 0 )<\/li>\n<li>the_sidebar( $fallback = '', $echo = false )<\/li>\n<li>get_the_sidebar( $post_id = 0 )<\/li>\n<li>get_custom_sidebars()<\/li>\n<li>get_all_sidebars()<\/li>\n<\/ul>\n\n<p><strong>Actions<\/strong><\/p>\n\n<ul>\n<li>ds_plugin_install<\/li>\n<li>ds_plugin_uninstall<\/li>\n<li>ds_plugin_deactivate<\/li>\n<li>ds_init<\/li>\n<li>ds_add_metabox<\/li>\n<li>ds_render_metabox<\/li>\n<li>ds_save<\/li>\n<li>ds_register_column<\/li>\n<\/ul>\n\n<p><strong>Filters<\/strong><\/p>\n\n<ul>\n<li>the_sidebar<\/li>\n<li>ds_save_permissions<\/li>\n<li>ds_save_ajax_message<\/li>\n<li>ds_save_ajax<\/li>\n<li>ds_sidebar_args<\/li>\n<li>ds_post_types<\/li>\n<\/ul>\n\n<p><strong>Constant<\/strong><\/p>\n\n<ul>\n<li>DS_PLUGIN_FOR_FRONT_PAGE<\/li>\n<li>DS_PLUGIN_FOR_POSTS_PAGE<\/li>\n<\/ul>\n\n<!--section=installation-->\n<p><strong>Please Note<\/strong><\/p>\n\n<ul>\n<li>Requires at least: 3.0<\/li>\n<li>Tested up to: 4.0<\/li>\n<\/ul>\n\n<p><strong>Install<\/strong><\/p>\n\n<ol>\n<li>Unzip the dynamics-sidebars.zip file.<\/li>\n<li>Upload the the dynamics-sidebars folder (not just the files in it!) to your wp-contents\/plugins folder. If you're using FTP, use 'binary' mode.<\/li>\n<\/ol>\n\n<p><strong>Activate<\/strong><\/p>\n\n<ol>\n<li>In your WordPress admin area, go to \"Plugins\" page<\/li>\n<li>Activate the \"Dynamics Sidebars\" plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>No FAQ yet.<\/p>\n\n<!--section=changelog-->\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Fix Strict Standards: Non-static method Dynamic_Sidebars::get_instance() should not be called statically in \/home\/public_html\/wp-content\/plugins\/dynamics-sidebars\/dynamics-sidebars.php on line 52<\/li>\n<\/ul>\n\n<p>Thanks to @<a href=\"https:\/\/profiles.wordpress.org\/leninkster\/\">leninkster<\/a><\/p>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Fixed issue when trying to activate the plugin. (PHP 5.4)<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fixed issue when trying to uninstall the plugin.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Fixed issue where sidebar is not registered.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Filter 'ds_save_ajax_message' now have a 2 param $error, true if has error false if everything is ok<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>CHANGED Action 'ds_construct' to 'ds_init'<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Api: has_sidebar()<\/li>\n<li>Action: ds_plugin_deactivate<\/li>\n<li>Action: ds_register_column<\/li>\n<li>Filter: ds_post_types<\/li>\n<li>Added register_post_type pass to 'supports' =&gt; array( 'custom-sidebar' )<\/li>\n<li>API: has_sidebar( $post_id = 0 )<\/li>\n<li>Support for add_post_type_support (add post type feature)<\/li>\n<li>Support for remove_post_type_support (remove post type feature)<\/li>\n<li>Support for post_type_supports (check if post type supports feature)<\/li>\n<li>Support for get_all_post_type_supports (get all features for a post type)<\/li>\n<li>REMOVED Constant: DS_PLUGIN_FOR_PAGES, to render or not \"Sidebar\" metabox for pages<\/li>\n<li>REMOVED Constant: DS_PLUGIN_FOR_POSTS, to render or not \"Sidebar\" metabox for posts<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Added: bulk edit<\/li>\n<li>Added: quick edit<\/li>\n<li>Added: select box with all registered sidebars and a text input for registering a new one<\/li>\n<li>Added: save via ajax<\/li>\n<li>Added: save via publich\/update\/save draft<\/li>\n<li>Added: .POT file for Internationalization (i18n)<\/li>\n<li>Added: pt_BR Translation<\/li>\n<li>Api: the_sidebar( $fallback = '', $echo = false )<\/li>\n<li>Api: get_the_sidebar( $post_id = 0 )<\/li>\n<li>Api: get_custom_sidebars()<\/li>\n<li>Api: get_all_sidebars()<\/li>\n<li>Filter: the_sidebar<\/li>\n<li>Filter: ds_save_permissions<\/li>\n<li>Filter: ds_save_ajax_message<\/li>\n<li>Filter: ds_save_ajax<\/li>\n<li>Filter: ds_sidebar_args<\/li>\n<li>Action: ds_plugin_install<\/li>\n<li>Action: ds_plugin_uninstall<\/li>\n<li>Action: ds_add_metabox<\/li>\n<li>Action: ds_render_metabox<\/li>\n<li>Action: ds_save<\/li>\n<li>Constant: DS_PLUGIN_FOR_PAGES, to render or not \"Sidebar\" metabox for pages<\/li>\n<li>Constant: DS_PLUGIN_FOR_POSTS, to render or not \"Sidebar\" metabox for posts<\/li>\n<li>Constant: DS_PLUGIN_FOR_FRONT_PAGE, to render or not \"Sidebar\" metabox for front page \"page_on_front\" (if set)<\/li>\n<li>Constant: DS_PLUGIN_FOR_POSTS_PAGE, to render or not \"Sidebar\" metabox for posts page \"page_for_posts\" (if set)<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>Added install and uninstall functions<\/li>\n<li>Changes to 'readme.txt'<\/li>\n<li>Requires at least: 3.0<\/li>\n<li>Tested up to: 3.4.1<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>First release.<\/li>\n<\/ul>","raw_excerpt":"DS adds functionality to display different widgets in a sidebar, according to a context (for example, a specific page).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/15090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=15090"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/alyssonweb"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=15090"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=15090"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=15090"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=15090"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=15090"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=15090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}