Version Description
- Genesis 2.0.1 compatibility with term meta keys
- Use actual sidebar name, instead of hard coded names
- Fix incorrect textdomain
Download this release
Release Info
Developer | nathanrice |
Plugin | Genesis Simple Sidebars |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- includes/inpost.php +10 -5
- includes/term.php +7 -7
- plugin.php +2 -2
- readme.txt +8 -3
includes/inpost.php
CHANGED
@@ -19,13 +19,18 @@ function ss_add_inpost_metabox() {
|
|
19 |
function ss_inpost_metabox() {
|
20 |
|
21 |
$_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) );
|
|
|
22 |
|
23 |
?>
|
24 |
|
25 |
<input type="hidden" name="ss_inpost_nonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" />
|
26 |
|
|
|
|
|
|
|
|
|
27 |
<p>
|
28 |
-
<label class="howto" for="_ss_sidebar"><span><?php
|
29 |
<select name="_ss_sidebar" id="_ss_sidebar" style="width: 99%">
|
30 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
31 |
<?php
|
@@ -36,12 +41,11 @@ function ss_inpost_metabox() {
|
|
36 |
</select>
|
37 |
</p>
|
38 |
<?php
|
39 |
-
|
40 |
-
if (
|
41 |
-
return;
|
42 |
?>
|
43 |
<p>
|
44 |
-
<label class="howto" for="_ss_sidebar_alt"><span><?php
|
45 |
<select name="_ss_sidebar_alt" id="_ss_sidebar_alt" style="width: 99%">
|
46 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
47 |
<?php
|
@@ -53,6 +57,7 @@ function ss_inpost_metabox() {
|
|
53 |
</p>
|
54 |
|
55 |
<?php
|
|
|
56 |
}
|
57 |
|
58 |
add_action( 'save_post', 'ss_inpost_metabox_save', 1, 2 );
|
19 |
function ss_inpost_metabox() {
|
20 |
|
21 |
$_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) );
|
22 |
+
global $wp_registered_sidebars;
|
23 |
|
24 |
?>
|
25 |
|
26 |
<input type="hidden" name="ss_inpost_nonce" value="<?php echo wp_create_nonce( plugin_basename( __FILE__ ) ); ?>" />
|
27 |
|
28 |
+
<?php
|
29 |
+
if( isset( $wp_registered_sidebars['sidebar'] ) ) {
|
30 |
+
?>
|
31 |
+
|
32 |
<p>
|
33 |
+
<label class="howto" for="_ss_sidebar"><span><?php echo esc_attr( $wp_registered_sidebars['sidebar']['name'] ); ?><span></label>
|
34 |
<select name="_ss_sidebar" id="_ss_sidebar" style="width: 99%">
|
35 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
36 |
<?php
|
41 |
</select>
|
42 |
</p>
|
43 |
<?php
|
44 |
+
}
|
45 |
+
if( isset( $wp_registered_sidebars['sidebar-alt'] ) ) {
|
|
|
46 |
?>
|
47 |
<p>
|
48 |
+
<label class="howto" for="_ss_sidebar_alt"><span><?php echo esc_attr( $wp_registered_sidebars['sidebar-alt']['name'] ); ?><span></label>
|
49 |
<select name="_ss_sidebar_alt" id="_ss_sidebar_alt" style="width: 99%">
|
50 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
51 |
<?php
|
57 |
</p>
|
58 |
|
59 |
<?php
|
60 |
+
}
|
61 |
}
|
62 |
|
63 |
add_action( 'save_post', 'ss_inpost_metabox_save', 1, 2 );
|
includes/term.php
CHANGED
@@ -19,10 +19,10 @@ function ss_term_edit_init() {
|
|
19 |
|
20 |
function ss_term_sidebar($tag, $taxonomy) {
|
21 |
|
22 |
-
|
23 |
$tag->meta = wp_parse_args( $tag->meta, array( '_ss_sidebar' => '', '_ss_sidebar_alt' => '' ) );
|
24 |
|
25 |
-
|
26 |
$_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) );
|
27 |
|
28 |
?>
|
@@ -31,9 +31,9 @@ function ss_term_sidebar($tag, $taxonomy) {
|
|
31 |
<table class="form-table">
|
32 |
|
33 |
<tr class="form-field">
|
34 |
-
<th scope="row" valign="top"><label for="meta[_ss_sidebar]"><?php _e( 'Primary Sidebar', 'ss' ); ?></label></th>
|
35 |
<td>
|
36 |
-
<select name="meta[_ss_sidebar]" id="meta[_ss_sidebar]" style="padding-right: 10px;">
|
37 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
38 |
<?php
|
39 |
foreach ( (array) $_sidebars as $id => $info ) {
|
@@ -44,13 +44,13 @@ function ss_term_sidebar($tag, $taxonomy) {
|
|
44 |
</td>
|
45 |
</tr>
|
46 |
<?php
|
47 |
-
|
48 |
if ( ss_has_3_column_layouts() ) {
|
49 |
?>
|
50 |
<tr class="form-field">
|
51 |
-
<th scope="row" valign="top"><label for="meta[_ss_sidebar_alt]"><?php _e( 'Secondary Sidebar', 'ss' ); ?></label></th>
|
52 |
<td>
|
53 |
-
<select name="meta[_ss_sidebar_alt]" id="meta[_ss_sidebar_alt]" style="padding-right: 10px;">
|
54 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
55 |
<?php
|
56 |
foreach ( (array) $_sidebars as $id => $info ) {
|
19 |
|
20 |
function ss_term_sidebar($tag, $taxonomy) {
|
21 |
|
22 |
+
//* Merge Defaults to prevent notices
|
23 |
$tag->meta = wp_parse_args( $tag->meta, array( '_ss_sidebar' => '', '_ss_sidebar_alt' => '' ) );
|
24 |
|
25 |
+
//* Pull custom sidebars
|
26 |
$_sidebars = stripslashes_deep( get_option( SS_SETTINGS_FIELD ) );
|
27 |
|
28 |
?>
|
31 |
<table class="form-table">
|
32 |
|
33 |
<tr class="form-field">
|
34 |
+
<th scope="row" valign="top"><label for="genesis-meta[_ss_sidebar]"><?php _e( 'Primary Sidebar', 'ss' ); ?></label></th>
|
35 |
<td>
|
36 |
+
<select name="genesis-meta[_ss_sidebar]" id="genesis-meta[_ss_sidebar]" style="padding-right: 10px;">
|
37 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
38 |
<?php
|
39 |
foreach ( (array) $_sidebars as $id => $info ) {
|
44 |
</td>
|
45 |
</tr>
|
46 |
<?php
|
47 |
+
//* don't show the option if there are no 3 column layouts registered
|
48 |
if ( ss_has_3_column_layouts() ) {
|
49 |
?>
|
50 |
<tr class="form-field">
|
51 |
+
<th scope="row" valign="top"><label for="genesis-meta[_ss_sidebar_alt]"><?php _e( 'Secondary Sidebar', 'ss' ); ?></label></th>
|
52 |
<td>
|
53 |
+
<select name="genesis-meta[_ss_sidebar_alt]" id="genesis-meta[_ss_sidebar_alt]" style="padding-right: 10px;">
|
54 |
<option value=""><?php _e( 'Default', 'ss' ); ?></option>
|
55 |
<?php
|
56 |
foreach ( (array) $_sidebars as $id => $info ) {
|
plugin.php
CHANGED
@@ -9,7 +9,7 @@ Author URI: http://www.nathanrice.net/
|
|
9 |
Text Domain: ss
|
10 |
Domain Path: /languages/
|
11 |
|
12 |
-
Version: 2.0.
|
13 |
|
14 |
License: GNU General Public License v2.0 (or later)
|
15 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
@@ -45,7 +45,7 @@ function ss_activation_check() {
|
|
45 |
function ss_deactivate( $genesis_version = '1.8.0', $wp_version = '3.3' ) {
|
46 |
|
47 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
48 |
-
wp_die( sprintf( __( 'Sorry, you cannot run Simple Sidebars without WordPress %s and <a href="%s">Genesis %s</a>, or greater.', '
|
49 |
|
50 |
}
|
51 |
|
9 |
Text Domain: ss
|
10 |
Domain Path: /languages/
|
11 |
|
12 |
+
Version: 2.0.1
|
13 |
|
14 |
License: GNU General Public License v2.0 (or later)
|
15 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
45 |
function ss_deactivate( $genesis_version = '1.8.0', $wp_version = '3.3' ) {
|
46 |
|
47 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
48 |
+
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 ) );
|
49 |
|
50 |
}
|
51 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: nathanrice, wpmuguru
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: hooks, genesis, genesiswp, studiopress
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.0.
|
8 |
|
9 |
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.
|
10 |
|
@@ -65,4 +65,9 @@ Not in the way you're probably thinking. The markup surrounding the widget area
|
|
65 |
|
66 |
= 2.0.0 =
|
67 |
* Compatibility with Genesis 2.0
|
68 |
-
* Standards
|
|
|
|
|
|
|
|
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
4 |
Tags: hooks, genesis, genesiswp, studiopress
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 4.2.2
|
7 |
+
Stable tag: 2.0.1
|
8 |
|
9 |
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.
|
10 |
|
65 |
|
66 |
= 2.0.0 =
|
67 |
* Compatibility with Genesis 2.0
|
68 |
+
* Standards
|
69 |
+
|
70 |
+
= 2.0.1 =
|
71 |
+
* Genesis 2.0.1 compatibility with term meta keys
|
72 |
+
* Use actual sidebar name, instead of hard coded names
|
73 |
+
* Fix incorrect textdomain
|