mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-06-05 15:08:34 +09:00
+2
-8
@@ -6,12 +6,6 @@ add_action('admin_menu', 'ss_add_inpost_metabox');
|
||||
*/
|
||||
function ss_add_inpost_metabox() {
|
||||
|
||||
global $wp_registered_sidebars;
|
||||
|
||||
if( ! array_key_exists( 'sidebar', $wp_registered_sidebars ) && ! array_key_exists( 'sidebar-alt', $wp_registered_sidebars ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( (array) get_post_types( array( 'public' => true ) ) as $type ) {
|
||||
|
||||
if ( post_type_supports( $type, 'genesis-simple-sidebars' ) || $type == 'post' || $type == 'page' ) {
|
||||
@@ -86,8 +80,8 @@ function ss_inpost_metabox_save( $post_id, $post ) {
|
||||
return $post->ID;
|
||||
|
||||
$_sidebars = array(
|
||||
'_ss_sidebar' => $_POST['_ss_sidebar'],
|
||||
'_ss_sidebar_alt' => $_POST['_ss_sidebar_alt'],
|
||||
'_ss_sidebar' => isset( $_POST['_ss_sidebar'] ) ? $_POST['_ss_sidebar'] : '',
|
||||
'_ss_sidebar_alt' => isset( $_POST['_ss_sidebar_alt'] ) ? $_POST['_ss_sidebar_alt'] : '',
|
||||
);
|
||||
|
||||
//* store the custom fields
|
||||
|
||||
+5
-1
@@ -9,7 +9,7 @@ Author URI: http://www.nathanrice.net/
|
||||
Text Domain: genesis-simple-sidebars
|
||||
Domain Path: /languages/
|
||||
|
||||
Version: 2.0.2
|
||||
Version: 2.0.3
|
||||
|
||||
License: GNU General Public License v2.0 (or later)
|
||||
License URI: http://www.opensource.org/licenses/gpl-license.php
|
||||
@@ -101,6 +101,10 @@ function ss_register_sidebars() {
|
||||
//* Cycle through created sidebars, register them as widget areas
|
||||
foreach ( (array) $_sidebars as $id => $info ) {
|
||||
|
||||
if ( ! isset( $info['name'] ) || ! isset( $info['description'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
genesis_register_sidebar( array(
|
||||
'name' => esc_html( $info['name'] ),
|
||||
'id' => $id,
|
||||
|
||||
+5
-2
@@ -3,8 +3,8 @@ Contributors: nathanrice, wpmuguru
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5553118
|
||||
Tags: hooks, genesis, genesiswp, studiopress
|
||||
Requires at least: 3.6
|
||||
Tested up to: 4.3.1
|
||||
Stable tag: 2.0.2
|
||||
Tested up to: 4.5
|
||||
Stable tag: 2.0.3
|
||||
|
||||
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.
|
||||
|
||||
@@ -37,6 +37,9 @@ Not in the way you're probably thinking. The markup surrounding the widget area
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.0.3 =
|
||||
* Fix warnings and notices
|
||||
|
||||
= 2.0.2 =
|
||||
* Change text domain, update POT file.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user