Version Description
- Update for WordPress 4.4+ and Genesis 2.3.0+
- DO NOT upgrade to 2.0.4 unless you are running WordPress 4.4+ AND Genesis 2.3.0+
Download this release
Release Info
| Developer | nathanrice |
| Plugin | |
| Version | 2.0.4 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.3 to 2.0.4
- Gruntfile.js +10 -14
- README.md +1 -0
- includes/term.php +2 -2
- languages/genesis-simple-sidebars.pot +5 -5
- package.json +16 -16
- plugin.php +13 -31
- readme.txt +6 -2
Gruntfile.js
CHANGED
|
@@ -20,21 +20,17 @@ module.exports = function(grunt) {
|
|
| 20 |
|
| 21 |
|
| 22 |
// I18n
|
| 23 |
-
|
| 24 |
// Add text domain as last argument of i18n functions
|
| 25 |
addtextdomain: {
|
| 26 |
php: {
|
| 27 |
options: {
|
| 28 |
updateDomains: true
|
| 29 |
},
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
'lib/**/*.php'
|
| 35 |
-
]
|
| 36 |
-
}
|
| 37 |
-
}
|
| 38 |
}
|
| 39 |
},
|
| 40 |
|
|
@@ -47,15 +43,15 @@ module.exports = function(grunt) {
|
|
| 47 |
'_e:1,2d',
|
| 48 |
'_x:1,2c,3d',
|
| 49 |
'_ex:1,2c,3d',
|
| 50 |
-
'_n:1,2,4d',
|
| 51 |
'_nx:1,2,4c,5d',
|
| 52 |
'_n_noop:1,2,3d',
|
| 53 |
'_nx_noop:1,2,3c,4d',
|
| 54 |
-
'esc_attr__:1,2d',
|
| 55 |
'esc_html__:1,2d',
|
| 56 |
-
'esc_attr_e:1,2d',
|
| 57 |
'esc_html_e:1,2d',
|
| 58 |
-
'esc_attr_x:1,2c,3d',
|
| 59 |
'esc_html_x:1,2c,3d'
|
| 60 |
]
|
| 61 |
},
|
|
@@ -79,7 +75,7 @@ module.exports = function(grunt) {
|
|
| 79 |
pot.headers['last-translator'] = 'StudioPress <translations@studiopress.com>';
|
| 80 |
pot.headers['language-team'] = 'English <translations@studiopress.com>';
|
| 81 |
pot.headers['plural-forms'] = 'nplurals=2; plural=n != 1;';
|
| 82 |
-
pot.headers['x-generator'] = 'grunt-wp-i18n
|
| 83 |
pot.headers['x-poedit-basepath'] = '.';
|
| 84 |
pot.headers['x-poedit-language'] = 'English';
|
| 85 |
pot.headers['x-poedit-country'] = 'UNITED STATES';
|
| 20 |
|
| 21 |
|
| 22 |
// I18n
|
| 23 |
+
|
| 24 |
// Add text domain as last argument of i18n functions
|
| 25 |
addtextdomain: {
|
| 26 |
php: {
|
| 27 |
options: {
|
| 28 |
updateDomains: true
|
| 29 |
},
|
| 30 |
+
src: [
|
| 31 |
+
'*.php',
|
| 32 |
+
'lib/**/*.php'
|
| 33 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
},
|
| 36 |
|
| 43 |
'_e:1,2d',
|
| 44 |
'_x:1,2c,3d',
|
| 45 |
'_ex:1,2c,3d',
|
| 46 |
+
'_n:1,2,4d',
|
| 47 |
'_nx:1,2,4c,5d',
|
| 48 |
'_n_noop:1,2,3d',
|
| 49 |
'_nx_noop:1,2,3c,4d',
|
| 50 |
+
'esc_attr__:1,2d',
|
| 51 |
'esc_html__:1,2d',
|
| 52 |
+
'esc_attr_e:1,2d',
|
| 53 |
'esc_html_e:1,2d',
|
| 54 |
+
'esc_attr_x:1,2c,3d',
|
| 55 |
'esc_html_x:1,2c,3d'
|
| 56 |
]
|
| 57 |
},
|
| 75 |
pot.headers['last-translator'] = 'StudioPress <translations@studiopress.com>';
|
| 76 |
pot.headers['language-team'] = 'English <translations@studiopress.com>';
|
| 77 |
pot.headers['plural-forms'] = 'nplurals=2; plural=n != 1;';
|
| 78 |
+
pot.headers['x-generator'] = 'grunt-wp-i18n';
|
| 79 |
pot.headers['x-poedit-basepath'] = '.';
|
| 80 |
pot.headers['x-poedit-language'] = 'English';
|
| 81 |
pot.headers['x-poedit-country'] = 'UNITED STATES';
|
README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
| 1 |
+
|
includes/term.php
CHANGED
|
@@ -37,7 +37,7 @@ function ss_term_sidebar($tag, $taxonomy) {
|
|
| 37 |
<option value=""><?php _e( 'Default', 'genesis-simple-sidebars' ); ?></option>
|
| 38 |
<?php
|
| 39 |
foreach ( (array) $_sidebars as $id => $info ) {
|
| 40 |
-
printf( '<option value="%s" %s>%s</option>', esc_html( $id ), selected( $id, $tag->
|
| 41 |
}
|
| 42 |
?>
|
| 43 |
</select>
|
|
@@ -54,7 +54,7 @@ function ss_term_sidebar($tag, $taxonomy) {
|
|
| 54 |
<option value=""><?php _e( 'Default', 'genesis-simple-sidebars' ); ?></option>
|
| 55 |
<?php
|
| 56 |
foreach ( (array) $_sidebars as $id => $info ) {
|
| 57 |
-
printf( '<option value="%s" %s>%s</option>', esc_html( $id ), selected( $id, $tag->
|
| 58 |
}
|
| 59 |
?>
|
| 60 |
</select>
|
| 37 |
<option value=""><?php _e( 'Default', 'genesis-simple-sidebars' ); ?></option>
|
| 38 |
<?php
|
| 39 |
foreach ( (array) $_sidebars as $id => $info ) {
|
| 40 |
+
printf( '<option value="%s" %s>%s</option>', esc_html( $id ), selected( $id, get_term_meta( $tag->term_id, '_ss_sidebar', true ), false), esc_html( $info['name'] ) );
|
| 41 |
}
|
| 42 |
?>
|
| 43 |
</select>
|
| 54 |
<option value=""><?php _e( 'Default', 'genesis-simple-sidebars' ); ?></option>
|
| 55 |
<?php
|
| 56 |
foreach ( (array) $_sidebars as $id => $info ) {
|
| 57 |
+
printf( '<option value="%s" %s>%s</option>', esc_html( $id ), selected( $id, get_term_meta( $tag->term_id, '_ss_sidebar_alt', true ), false), esc_html( $info['name'] ) );
|
| 58 |
}
|
| 59 |
?>
|
| 60 |
</select>
|
languages/genesis-simple-sidebars.pot
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
-
# Copyright (C)
|
| 2 |
# This file is distributed under the GNU General Public License v2.0 (or later).
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: Genesis Simple Sidebars 2.0.
|
| 6 |
"Report-Msgid-Bugs-To: StudioPress <translations@studiopress.com>\n"
|
| 7 |
-
"POT-Creation-Date:
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
-
"PO-Revision-Date:
|
| 12 |
"Last-Translator: StudioPress <translations@studiopress.com>\n"
|
| 13 |
"Language-Team: English <translations@studiopress.com>\n"
|
| 14 |
-
"X-Generator: grunt-wp-i18n
|
| 15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
| 16 |
"X-Poedit-Basepath: .\n"
|
| 17 |
"X-Poedit-Language: English\n"
|
| 1 |
+
# Copyright (C) 2016 Nathan Rice
|
| 2 |
# This file is distributed under the GNU General Public License v2.0 (or later).
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: Genesis Simple Sidebars 2.0.3\n"
|
| 6 |
"Report-Msgid-Bugs-To: StudioPress <translations@studiopress.com>\n"
|
| 7 |
+
"POT-Creation-Date: 2016-02-24 19:51:21+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
| 12 |
"Last-Translator: StudioPress <translations@studiopress.com>\n"
|
| 13 |
"Language-Team: English <translations@studiopress.com>\n"
|
| 14 |
+
"X-Generator: grunt-wp-i18n\n"
|
| 15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
| 16 |
"X-Poedit-Basepath: .\n"
|
| 17 |
"X-Poedit-Language: English\n"
|
package.json
CHANGED
|
@@ -7,21 +7,21 @@
|
|
| 7 |
},
|
| 8 |
"dependencies": {},
|
| 9 |
"devDependencies": {
|
| 10 |
-
"grunt": "
|
| 11 |
-
"grunt-autoprefixer": "
|
| 12 |
-
"grunt-checktextdomain": "
|
| 13 |
-
"grunt-contrib-cssmin": "
|
| 14 |
-
"grunt-contrib-imagemin": "
|
| 15 |
-
"grunt-contrib-jshint": "
|
| 16 |
-
"grunt-contrib-uglify": "
|
| 17 |
-
"grunt-contrib-watch": "
|
| 18 |
-
"grunt-csscomb": "
|
| 19 |
-
"grunt-jsbeautifier": "
|
| 20 |
-
"grunt-jsvalidate": "
|
| 21 |
-
"grunt-phplint": "
|
| 22 |
-
"grunt-styledocco": "
|
| 23 |
-
"grunt-wp-i18n": "
|
| 24 |
-
"load-grunt-tasks": "
|
| 25 |
},
|
| 26 |
"plugin": {
|
| 27 |
"name": "Genesis Simple Sidebars",
|
|
@@ -29,7 +29,7 @@
|
|
| 29 |
"description": "Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas.",
|
| 30 |
"author": "StudioPress",
|
| 31 |
"authoruri": "http://www.studiopress.com/",
|
| 32 |
-
"version": "2.0.
|
| 33 |
"license": "GPL-2.0+",
|
| 34 |
"licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
|
| 35 |
"textdomain": "genesis-simple-sidebars"
|
| 7 |
},
|
| 8 |
"dependencies": {},
|
| 9 |
"devDependencies": {
|
| 10 |
+
"grunt": "*",
|
| 11 |
+
"grunt-autoprefixer": "*",
|
| 12 |
+
"grunt-checktextdomain": "*",
|
| 13 |
+
"grunt-contrib-cssmin": "*",
|
| 14 |
+
"grunt-contrib-imagemin": "*",
|
| 15 |
+
"grunt-contrib-jshint": "*",
|
| 16 |
+
"grunt-contrib-uglify": "*",
|
| 17 |
+
"grunt-contrib-watch": "*",
|
| 18 |
+
"grunt-csscomb": "*",
|
| 19 |
+
"grunt-jsbeautifier": "*",
|
| 20 |
+
"grunt-jsvalidate": "*",
|
| 21 |
+
"grunt-phplint": "*",
|
| 22 |
+
"grunt-styledocco": "*",
|
| 23 |
+
"grunt-wp-i18n": "*",
|
| 24 |
+
"load-grunt-tasks": "*"
|
| 25 |
},
|
| 26 |
"plugin": {
|
| 27 |
"name": "Genesis Simple Sidebars",
|
| 29 |
"description": "Genesis Simple Sidebars allows you to easily create and use new sidebar widget areas.",
|
| 30 |
"author": "StudioPress",
|
| 31 |
"authoruri": "http://www.studiopress.com/",
|
| 32 |
+
"version": "2.0.4",
|
| 33 |
"license": "GPL-2.0+",
|
| 34 |
"licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
|
| 35 |
"textdomain": "genesis-simple-sidebars"
|
plugin.php
CHANGED
|
@@ -7,9 +7,9 @@ Author: Nathan Rice
|
|
| 7 |
Author URI: http://www.nathanrice.net/
|
| 8 |
|
| 9 |
Text Domain: genesis-simple-sidebars
|
| 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
|
|
@@ -30,8 +30,8 @@ register_activation_hook( __FILE__, 'ss_activation_check' );
|
|
| 30 |
*/
|
| 31 |
function ss_activation_check() {
|
| 32 |
|
| 33 |
-
if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, '2.
|
| 34 |
-
ss_deactivate( '2.
|
| 35 |
|
| 36 |
}
|
| 37 |
|
|
@@ -42,7 +42,7 @@ function ss_activation_check() {
|
|
| 42 |
*
|
| 43 |
* @since 1.0.0
|
| 44 |
*/
|
| 45 |
-
function ss_deactivate( $genesis_version = '
|
| 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.', 'genesis-simple-sidebars' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) );
|
|
@@ -173,37 +173,19 @@ function ss_do_sidebar_alt() {
|
|
| 173 |
*/
|
| 174 |
function ss_do_one_sidebar( $sidebar_key = '_ss_sidebar' ) {
|
| 175 |
|
| 176 |
-
static $taxonomies = null;
|
| 177 |
-
|
| 178 |
if ( is_singular() && $sidebar_key = genesis_get_custom_field( $sidebar_key ) ) {
|
| 179 |
-
if ( dynamic_sidebar( $sidebar_key ) )
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
if ( is_category() ) {
|
| 183 |
-
$term = get_term( get_query_var( 'cat' ), 'category' );
|
| 184 |
-
if ( isset( $term->meta[$sidebar_key] ) && dynamic_sidebar( $term->meta[$sidebar_key] ) ) return true;
|
| 185 |
-
}
|
| 186 |
-
|
| 187 |
-
if ( is_tag() ) {
|
| 188 |
-
$term = get_term( get_query_var( 'tag_id' ), 'post_tag' );
|
| 189 |
-
if ( isset( $term->meta[$sidebar_key] ) && dynamic_sidebar( $term->meta[$sidebar_key] ) ) return true;
|
| 190 |
}
|
| 191 |
|
| 192 |
-
if ( is_tax() ) {
|
| 193 |
-
if ( null === $taxonomies )
|
| 194 |
-
$taxonomies = ss_get_taxonomies();
|
| 195 |
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
if ( is_tax( $tax ) ) {
|
| 201 |
-
$obj = get_queried_object();
|
| 202 |
-
$term = get_term( $obj->term_id, $tax );
|
| 203 |
-
if ( isset( $term->meta[$sidebar_key] ) && dynamic_sidebar( $term->meta[$sidebar_key] ) ) return true;
|
| 204 |
-
break;
|
| 205 |
-
}
|
| 206 |
}
|
|
|
|
| 207 |
}
|
| 208 |
|
| 209 |
return false;
|
| 7 |
Author URI: http://www.nathanrice.net/
|
| 8 |
|
| 9 |
Text Domain: genesis-simple-sidebars
|
| 10 |
+
Domain Path: /languages
|
| 11 |
|
| 12 |
+
Version: 2.0.4
|
| 13 |
|
| 14 |
License: GNU General Public License v2.0 (or later)
|
| 15 |
License URI: http://www.opensource.org/licenses/gpl-license.php
|
| 30 |
*/
|
| 31 |
function ss_activation_check() {
|
| 32 |
|
| 33 |
+
if ( ! defined( 'PARENT_THEME_VERSION' ) || ! version_compare( PARENT_THEME_VERSION, '2.3.0', '>=' ) )
|
| 34 |
+
ss_deactivate( '2.3.0', '4.4.2' );
|
| 35 |
|
| 36 |
}
|
| 37 |
|
| 42 |
*
|
| 43 |
* @since 1.0.0
|
| 44 |
*/
|
| 45 |
+
function ss_deactivate( $genesis_version = '2.3.0', $wp_version = '4.4.2' ) {
|
| 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.', 'genesis-simple-sidebars' ), $wp_version, 'http://my.studiopress.com/?download_id=91046d629e74d525b3f2978e404e7ffa', $genesis_version ) );
|
| 173 |
*/
|
| 174 |
function ss_do_one_sidebar( $sidebar_key = '_ss_sidebar' ) {
|
| 175 |
|
|
|
|
|
|
|
| 176 |
if ( is_singular() && $sidebar_key = genesis_get_custom_field( $sidebar_key ) ) {
|
| 177 |
+
if ( dynamic_sidebar( $sidebar_key ) ) {
|
| 178 |
+
return true;
|
| 179 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
}
|
| 181 |
|
| 182 |
+
if ( is_tax() || is_category() || is_tag() ) {
|
|
|
|
|
|
|
| 183 |
|
| 184 |
+
if ( $sidebar_key = get_term_meta( get_queried_object()->term_id, $sidebar_key, true ) ) {
|
| 185 |
+
dynamic_sidebar( $sidebar_key );
|
| 186 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
}
|
| 188 |
+
|
| 189 |
}
|
| 190 |
|
| 191 |
return false;
|
readme.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
=== Plugin Name ===
|
| 2 |
-
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: 4.5
|
| 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 |
|
|
@@ -37,6 +37,10 @@ Not in the way you're probably thinking. The markup surrounding the widget area
|
|
| 37 |
|
| 38 |
== Changelog ==
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
= 2.0.3 =
|
| 41 |
* Fix warnings and notices
|
| 42 |
|
| 1 |
=== Plugin Name ===
|
| 2 |
+
Contributors: nathanrice, wpmuguru, studiopress
|
| 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.5
|
| 7 |
+
Stable tag: 2.0.4
|
| 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 |
|
| 37 |
|
| 38 |
== Changelog ==
|
| 39 |
|
| 40 |
+
= 2.0.4 =
|
| 41 |
+
* Update for WordPress 4.4+ and Genesis 2.3.0+
|
| 42 |
+
* DO NOT upgrade to 2.0.4 unless you are running WordPress 4.4+ AND Genesis 2.3.0+
|
| 43 |
+
|
| 44 |
= 2.0.3 =
|
| 45 |
* Fix warnings and notices
|
| 46 |
|
