Genesis Simple Sidebars - Version 0.9.2.1

Version Description

  • Restore default tag/category support
  • Default custom taxonomy support to on for public taxonomies
  • Remove secondary selection when no 3 column layouts are enabled
Download this release

Release Info

Developer wpmuguru
Plugin Icon 128x128 Genesis Simple Sidebars
Version 0.9.2.1
Comparing to
See all releases

Code changes from version 0.9.2 to 0.9.2.1

Files changed (4) hide show
  1. inpost.php +1 -4
  2. plugin.php +18 -2
  3. readme.txt +7 -1
  4. term.php +8 -3
inpost.php CHANGED
@@ -31,10 +31,7 @@ function ss_inpost_metabox() {
31
  </p>
32
  <?php
33
  // don't show the option if there are no 3 column layouts registered
34
- $_layouts = (array) genesis_get_layouts();
35
- $_layouts = array_keys( $_layouts );
36
- $_3_column = array_intersect( $_layouts, array( 'content-sidebar-sidebar', 'sidebar-content-sidebar', 'sidebar-sidebar-content' ) );
37
- if ( empty( $_3_column ) )
38
  return;
39
  ?>
40
  <p>
31
  </p>
32
  <?php
33
  // don't show the option if there are no 3 column layouts registered
34
+ if ( !ss_has_3_column_layouts() )
 
 
 
35
  return;
36
  ?>
37
  <p>
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Genesis Simple Sidebars
4
  Plugin URI: http://www.studiopress.com/plugins/simple-sidebars
5
  Description: Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas.
6
- Version: 0.9.2
7
  Author: Nathan Rice
8
  Author URI: http://www.nathanrice.net/
9
  Text Domain: ss
@@ -125,7 +125,7 @@ function ss_do_one_sidebar( $bar = '_ss_sidebar' ) {
125
 
126
  if ( is_tax() ) {
127
  if( $taxonomies === null )
128
- $taxonomies = (array)apply_filters( 'genesis_simple_sidebars_taxonomies', array() );
129
 
130
  foreach( $taxonomies as $tax ) {
131
  if( $tax == 'post_tag' || $tax == 'category' )
@@ -143,3 +143,19 @@ function ss_do_one_sidebar( $bar = '_ss_sidebar' ) {
143
  return false;
144
 
145
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Plugin Name: Genesis Simple Sidebars
4
  Plugin URI: http://www.studiopress.com/plugins/simple-sidebars
5
  Description: Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas.
6
+ Version: 0.9.2.1
7
  Author: Nathan Rice
8
  Author URI: http://www.nathanrice.net/
9
  Text Domain: ss
125
 
126
  if ( is_tax() ) {
127
  if( $taxonomies === null )
128
+ $taxonomies = ss_get_taxonomies();
129
 
130
  foreach( $taxonomies as $tax ) {
131
  if( $tax == 'post_tag' || $tax == 'category' )
143
  return false;
144
 
145
  }
146
+
147
+ function ss_get_taxonomies() {
148
+
149
+ $taxonomies = get_taxonomies( array( 'show_ui' => true, 'public' => true ) );
150
+ return apply_filters( 'genesis_simple_sidebars_taxonomies', array_keys( $taxonomies ) );
151
+
152
+ }
153
+
154
+ function ss_has_3_column_layouts() {
155
+
156
+ $_layouts = (array) genesis_get_layouts();
157
+ $_layouts = array_keys( $_layouts );
158
+ $_3_column = array_intersect( $_layouts, array( 'content-sidebar-sidebar', 'sidebar-content-sidebar', 'sidebar-sidebar-content' ) );
159
+ return ! empty( $_3_column );
160
+
161
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: hooks, genesis, genesiswp, studiopress
5
  Requires at least: 3.0
6
  Tested up to: 3.3
7
- Stable tag: 0.9.2
8
 
9
  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.
10
 
@@ -53,3 +53,9 @@ Not in the way you're probably thinking. The markup surrounding the widget area
53
  * Added support for custom taxonomies
54
  * Added translation support
55
  * bug fix to prevent invalid sidebar creation
 
 
 
 
 
 
4
  Tags: hooks, genesis, genesiswp, studiopress
5
  Requires at least: 3.0
6
  Tested up to: 3.3
7
+ Stable tag: 0.9.2.1
8
 
9
  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.
10
 
53
  * Added support for custom taxonomies
54
  * Added translation support
55
  * bug fix to prevent invalid sidebar creation
56
+
57
+ = 0.9.2.1 =
58
+ * Restore default tag/category support
59
+ * Default custom taxonomy support to on for public taxonomies
60
+ * Remove secondary selection when no 3 column layouts are enabled
61
+
term.php CHANGED
@@ -5,7 +5,7 @@
5
  * are passed via the hook so that we can use them.
6
  */
7
  function ss_term_edit_init() {
8
- $taxonomies = apply_filters( 'genesis_simple_sidebars_taxonomies', array() );
9
  if( !empty( $taxonomies ) && is_admin() && is_array( $taxonomies ) ) {
10
  foreach( $taxonomies as $tax )
11
  add_action( "{$tax}_edit_form", 'ss_term_sidebar', 9, 2 );
@@ -38,7 +38,10 @@ function ss_term_sidebar($tag, $taxonomy) {
38
  </select>
39
  </td>
40
  </tr>
41
-
 
 
 
42
  <tr class="form-field">
43
  <th scope="row" valign="top"><label for="meta[_ss_sidebar_alt]"><?php _e('Secondary Sidebar', 'ss'); ?></label></th>
44
  <td>
@@ -52,7 +55,9 @@ function ss_term_sidebar($tag, $taxonomy) {
52
  </select>
53
  </td>
54
  </tr>
55
-
 
 
56
  </table>
57
 
58
  <?php
5
  * are passed via the hook so that we can use them.
6
  */
7
  function ss_term_edit_init() {
8
+ $taxonomies = ss_get_taxonomies();
9
  if( !empty( $taxonomies ) && is_admin() && is_array( $taxonomies ) ) {
10
  foreach( $taxonomies as $tax )
11
  add_action( "{$tax}_edit_form", 'ss_term_sidebar', 9, 2 );
38
  </select>
39
  </td>
40
  </tr>
41
+ <?php
42
+ // don't show the option if there are no 3 column layouts registered
43
+ if ( ss_has_3_column_layouts() ) {
44
+ ?>
45
  <tr class="form-field">
46
  <th scope="row" valign="top"><label for="meta[_ss_sidebar_alt]"><?php _e('Secondary Sidebar', 'ss'); ?></label></th>
47
  <td>
55
  </select>
56
  </td>
57
  </tr>
58
+ <?php
59
+ }
60
+ ?>
61
  </table>
62
 
63
  <?php