From 39f34f998217b7bf05d97f070f3c9c55f5efea5f Mon Sep 17 00:00:00 2001 From: Nathan Rice Date: Fri, 9 Aug 2013 13:09:21 -0400 Subject: [PATCH] Tagging 0.9.2.1. --- inpost.php | 5 +---- plugin.php | 20 ++++++++++++++++++-- readme.txt | 8 +++++++- term.php | 11 ++++++++--- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/inpost.php b/inpost.php index 78a65ad..735b68f 100644 --- a/inpost.php +++ b/inpost.php @@ -31,10 +31,7 @@ function ss_inpost_metabox() {

diff --git a/plugin.php b/plugin.php index 5c5fe00..bea01c0 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ Plugin Name: Genesis Simple Sidebars Plugin URI: http://www.studiopress.com/plugins/simple-sidebars Description: Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas. -Version: 0.9.2 +Version: 0.9.2.1 Author: Nathan Rice Author URI: http://www.nathanrice.net/ Text Domain: ss @@ -125,7 +125,7 @@ function ss_do_one_sidebar( $bar = '_ss_sidebar' ) { if ( is_tax() ) { if( $taxonomies === null ) - $taxonomies = (array)apply_filters( 'genesis_simple_sidebars_taxonomies', array() ); + $taxonomies = ss_get_taxonomies(); foreach( $taxonomies as $tax ) { if( $tax == 'post_tag' || $tax == 'category' ) @@ -143,3 +143,19 @@ function ss_do_one_sidebar( $bar = '_ss_sidebar' ) { return false; } + +function ss_get_taxonomies() { + + $taxonomies = get_taxonomies( array( 'show_ui' => true, 'public' => true ) ); + return apply_filters( 'genesis_simple_sidebars_taxonomies', array_keys( $taxonomies ) ); + +} + +function ss_has_3_column_layouts() { + + $_layouts = (array) genesis_get_layouts(); + $_layouts = array_keys( $_layouts ); + $_3_column = array_intersect( $_layouts, array( 'content-sidebar-sidebar', 'sidebar-content-sidebar', 'sidebar-sidebar-content' ) ); + return ! empty( $_3_column ); + +} diff --git a/readme.txt b/readme.txt index 44312cf..7a4ccf2 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: hooks, genesis, genesiswp, studiopress Requires at least: 3.0 Tested up to: 3.3 -Stable tag: 0.9.2 +Stable tag: 0.9.2.1 This plugin allows you to create multiple, dynamic widget areas, and assign those widget areas to sidebar locations within the Genesis Theme Framework on a per post, per page, or per tag/category archive basis. @@ -53,3 +53,9 @@ Not in the way you're probably thinking. The markup surrounding the widget area * Added support for custom taxonomies * Added translation support * bug fix to prevent invalid sidebar creation + += 0.9.2.1 = +* Restore default tag/category support +* Default custom taxonomy support to on for public taxonomies +* Remove secondary selection when no 3 column layouts are enabled + diff --git a/term.php b/term.php index 3613af6..924a6f3 100644 --- a/term.php +++ b/term.php @@ -5,7 +5,7 @@ * are passed via the hook so that we can use them. */ function ss_term_edit_init() { - $taxonomies = apply_filters( 'genesis_simple_sidebars_taxonomies', array() ); + $taxonomies = ss_get_taxonomies(); if( !empty( $taxonomies ) && is_admin() && is_array( $taxonomies ) ) { foreach( $taxonomies as $tax ) add_action( "{$tax}_edit_form", 'ss_term_sidebar', 9, 2 ); @@ -38,7 +38,10 @@ function ss_term_sidebar($tag, $taxonomy) { - + @@ -52,7 +55,9 @@ function ss_term_sidebar($tag, $taxonomy) { - +