6 Commits

Author SHA1 Message Date
Nathan Rice f021c01b25 Tagging 2.0.1. 2013-08-26 15:04:07 -04:00
Nathan Rice eedd494ae5 Use proper key for Genesis 2.0.1 compatibility. 2013-08-26 15:02:02 -04:00
Nathan Rice d8e63f2ccd Merge pull request #2 from GaryJones/patch-1
Fix incorrect text domain
2013-08-26 11:58:40 -07:00
Nathan Rice dcae718c4a Merge pull request #1 from billerickson/develop
use sidebar name rather than hardcoded labels
2013-08-26 11:58:24 -07:00
Gary Jones b69d318af9 Fix incorrect text domain 2013-08-20 03:40:55 +01:00
Bill Erickson f84db05c75 use sidebar name rather than hardcoded labels 2013-08-09 18:44:30 -05:00
4 changed files with 23 additions and 13 deletions
+10 -5
View File
@@ -19,13 +19,18 @@ function ss_add_inpost_metabox() {
function ss_inpost_metabox() { function ss_inpost_metabox() {
$_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) ); $_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) );
global $wp_registered_sidebars;
?> ?>
<input type="hidden" name="ss_inpost_nonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" /> <input type="hidden" name="ss_inpost_nonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" />
<?php
if( isset( $wp_registered_sidebars['sidebar'] ) ) {
?>
<p> <p>
<label class="howto" for="_ss_sidebar"><span><?php _e( 'Primary Sidebar', 'ss' ); ?><span></label> <label class="howto" for="_ss_sidebar"><span><?php echo esc_attr( $wp_registered_sidebars['sidebar']['name'] ); ?><span></label>
<select name="_ss_sidebar" id="_ss_sidebar" style="width: 99%"> <select name="_ss_sidebar" id="_ss_sidebar" style="width: 99%">
<option value=""><?php _e( 'Default', 'ss' ); ?></option> <option value=""><?php _e( 'Default', 'ss' ); ?></option>
<?php <?php
@@ -36,12 +41,11 @@ function ss_inpost_metabox() {
</select> </select>
</p> </p>
<?php <?php
//* don't show the option if there are no 3 column layouts registered }
if ( ! ss_has_3_column_layouts() ) if( isset( $wp_registered_sidebars['sidebar-alt'] ) ) {
return;
?> ?>
<p> <p>
<label class="howto" for="_ss_sidebar_alt"><span><?php _e( 'Secondary Sidebar', 'ss' ); ?><span></label> <label class="howto" for="_ss_sidebar_alt"><span><?php echo esc_attr( $wp_registered_sidebars['sidebar-alt']['name'] ); ?><span></label>
<select name="_ss_sidebar_alt" id="_ss_sidebar_alt" style="width: 99%"> <select name="_ss_sidebar_alt" id="_ss_sidebar_alt" style="width: 99%">
<option value=""><?php _e( 'Default', 'ss' ); ?></option> <option value=""><?php _e( 'Default', 'ss' ); ?></option>
<?php <?php
@@ -53,6 +57,7 @@ function ss_inpost_metabox() {
</p> </p>
<?php <?php
}
} }
add_action( 'save_post', 'ss_inpost_metabox_save', 1, 2 ); add_action( 'save_post', 'ss_inpost_metabox_save', 1, 2 );
+4 -4
View File
@@ -31,9 +31,9 @@ function ss_term_sidebar($tag, $taxonomy) {
<table class="form-table"> <table class="form-table">
<tr class="form-field"> <tr class="form-field">
<th scope="row" valign="top"><label for="meta[_ss_sidebar]"><?php _e( 'Primary Sidebar', 'ss' ); ?></label></th> <th scope="row" valign="top"><label for="genesis-meta[_ss_sidebar]"><?php _e( 'Primary Sidebar', 'ss' ); ?></label></th>
<td> <td>
<select name="meta[_ss_sidebar]" id="meta[_ss_sidebar]" style="padding-right: 10px;"> <select name="genesis-meta[_ss_sidebar]" id="genesis-meta[_ss_sidebar]" style="padding-right: 10px;">
<option value=""><?php _e( 'Default', 'ss' ); ?></option> <option value=""><?php _e( 'Default', 'ss' ); ?></option>
<?php <?php
foreach ( (array) $_sidebars as $id => $info ) { foreach ( (array) $_sidebars as $id => $info ) {
@@ -48,9 +48,9 @@ function ss_term_sidebar($tag, $taxonomy) {
if ( ss_has_3_column_layouts() ) { if ( ss_has_3_column_layouts() ) {
?> ?>
<tr class="form-field"> <tr class="form-field">
<th scope="row" valign="top"><label for="meta[_ss_sidebar_alt]"><?php _e( 'Secondary Sidebar', 'ss' ); ?></label></th> <th scope="row" valign="top"><label for="genesis-meta[_ss_sidebar_alt]"><?php _e( 'Secondary Sidebar', 'ss' ); ?></label></th>
<td> <td>
<select name="meta[_ss_sidebar_alt]" id="meta[_ss_sidebar_alt]" style="padding-right: 10px;"> <select name="genesis-meta[_ss_sidebar_alt]" id="genesis-meta[_ss_sidebar_alt]" style="padding-right: 10px;">
<option value=""><?php _e( 'Default', 'ss' ); ?></option> <option value=""><?php _e( 'Default', 'ss' ); ?></option>
<?php <?php
foreach ( (array) $_sidebars as $id => $info ) { foreach ( (array) $_sidebars as $id => $info ) {
+2 -2
View File
@@ -9,7 +9,7 @@ Author URI: http://www.nathanrice.net/
Text Domain: ss Text Domain: ss
Domain Path: /languages/ Domain Path: /languages/
Version: 2.0.0 Version: 2.0.1
License: GNU General Public License v2.0 (or later) License: GNU General Public License v2.0 (or later)
License URI: http://www.opensource.org/licenses/gpl-license.php License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -45,7 +45,7 @@ function ss_activation_check() {
function ss_deactivate( $genesis_version = '1.8.0', $wp_version = '3.3' ) { function ss_deactivate( $genesis_version = '1.8.0', $wp_version = '3.3' ) {
deactivate_plugins( plugin_basename( __FILE__ ) ); deactivate_plugins( plugin_basename( __FILE__ ) );
wp_die( sprintf( __( 'Sorry, you cannot run Simple Sidebars without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', 'simplehooks' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) ); wp_die( sprintf( __( 'Sorry, you cannot run Simple Sidebars without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', 'ss' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) );
} }
+7 -2
View File
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: hooks, genesis, genesiswp, studiopress Tags: hooks, genesis, genesiswp, studiopress
Requires at least: 3.6 Requires at least: 3.6
Tested up to: 3.6 Tested up to: 3.6
Stable tag: 2.0.0 Stable tag: 2.0.1
This plugin allows you to create multiple, dynamic widget areas, and assign those widget areas to sidebar locations within the Genesis Framework on a per post, per page, or per tag/category archive basis. This plugin allows you to create multiple, dynamic widget areas, and assign those widget areas to sidebar locations within the Genesis Framework on a per post, per page, or per tag/category archive basis.
@@ -65,4 +65,9 @@ Not in the way you're probably thinking. The markup surrounding the widget area
= 2.0.0 = = 2.0.0 =
* Compatibility with Genesis 2.0 * Compatibility with Genesis 2.0
* Standards * Standards
= 2.0.1 =
* Genesis 2.0.1 compatibility with term meta keys
* Use actual sidebar name, instead of hard coded names
* Fix incorrect textdomain