mirror of
https://github.com/10h30/genesis-simple-sidebars.git
synced 2026-07-11 18:46:05 +09:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f021c01b25 | |||
| eedd494ae5 | |||
| d8e63f2ccd | |||
| dcae718c4a | |||
| b69d318af9 | |||
| f84db05c75 |
+10
-5
@@ -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
@@ -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
@@ -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
@@ -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
|
||||||
Reference in New Issue
Block a user