mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-06-05 15:08:34 +09:00
Tagging 0.9.2.1.
This commit is contained in:
+1
-4
@@ -31,10 +31,7 @@ function ss_inpost_metabox() {
|
||||
</p>
|
||||
<?php
|
||||
// don't show the option if there are no 3 column layouts registered
|
||||
$_layouts = (array) genesis_get_layouts();
|
||||
$_layouts = array_keys( $_layouts );
|
||||
$_3_column = array_intersect( $_layouts, array( 'content-sidebar-sidebar', 'sidebar-content-sidebar', 'sidebar-sidebar-content' ) );
|
||||
if ( empty( $_3_column ) )
|
||||
if ( !ss_has_3_column_layouts() )
|
||||
return;
|
||||
?>
|
||||
<p>
|
||||
|
||||
+18
-2
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
+7
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
// don't show the option if there are no 3 column layouts registered
|
||||
if ( ss_has_3_column_layouts() ) {
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<th scope="row" valign="top"><label for="meta[_ss_sidebar_alt]"><?php _e('Secondary Sidebar', 'ss'); ?></label></th>
|
||||
<td>
|
||||
@@ -52,7 +55,9 @@ function ss_term_sidebar($tag, $taxonomy) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user