From 78faae2bbd638832f9ffc546020fd0a88fc826fc Mon Sep 17 00:00:00 2001
From: Nathan Rice
Date: Fri, 9 Aug 2013 13:07:35 -0400
Subject: [PATCH] Tagging 0.9.2.
---
admin.php | 4 +-
functions.php | 10 +-
inpost.php | 11 +-
languages/ss-de_DE.mo | Bin 0 -> 4651 bytes
languages/ss-de_DE.po | 226 ++++++++++++++++++++++++++++++++++++++++++
languages/ss.po | 148 +++++++++++++++++++++++++++
plugin.php | 99 +++++++++++-------
readme.txt | 13 ++-
term.php | 10 +-
9 files changed, 474 insertions(+), 47 deletions(-)
create mode 100644 languages/ss-de_DE.mo
create mode 100644 languages/ss-de_DE.po
create mode 100644 languages/ss.po
diff --git a/admin.php b/admin.php
index 0225cbd..b10cd86 100644
--- a/admin.php
+++ b/admin.php
@@ -5,7 +5,7 @@
add_action('admin_init', 'register_ss_settings');
function register_ss_settings() {
register_setting(SS_SETTINGS_FIELD, SS_SETTINGS_FIELD);
- add_option(SS_SETTINGS_FIELD, '__return_empty_array', '', 'yes');
+ add_option(SS_SETTINGS_FIELD, array(), '', 'yes');
}
/**
@@ -96,7 +96,7 @@ function ss_settings_admin() { ?>
-
+
diff --git a/functions.php b/functions.php
index c12f5bc..ede9528 100644
--- a/functions.php
+++ b/functions.php
@@ -50,6 +50,10 @@ function ss_create_sidebar( $args = array() ) {
// nonce verification
check_admin_referer('simple-sidebars-action_create-sidebar');
+ // WP changes a numeric sidebar id to sidebar-id which makes it inaccessible to the user
+ if ( is_numeric( $args['id'] ) )
+ $args['id'] = sanitize_title_with_dashes( $args['name'] );
+
$db = (array)get_option(SS_SETTINGS_FIELD);
$new = array(
sanitize_title_with_dashes( $args['id'] ) => array(
@@ -81,6 +85,10 @@ function ss_edit_sidebar( $args = array() ) {
// nonce verification
check_admin_referer('simple-sidebars-action_edit-sidebar');
+ // WP changes a numeric sidebar id to sidebar-id which makes it inaccessible to the user
+ if ( is_numeric( $args['id'] ) )
+ $args['id'] = sanitize_title_with_dashes( $args['name'] );
+
$db = (array)get_option(SS_SETTINGS_FIELD);
$new = array(
sanitize_title_with_dashes( $args['id'] ) => array(
@@ -137,7 +145,7 @@ function ss_error_message( $error = false ) {
return __('Oops! Please choose a valid Name and ID for this sidebar', 'ss');
break;
case 2:
- return __('Oops! That sidebar ID already exists');
+ return __('Oops! That sidebar ID already exists', 'ss');
break;
case 3:
return __('Oops! You are trying to edit a sidebar that does not exist, or is not editable', 'ss');
diff --git a/inpost.php b/inpost.php
index b8317a2..78a65ad 100644
--- a/inpost.php
+++ b/inpost.php
@@ -7,7 +7,7 @@ add_action('admin_menu', 'ss_add_inpost_metabox');
function ss_add_inpost_metabox() {
foreach ( (array)get_post_types( array( 'public' => true ) ) as $type ) {
if ( post_type_supports( $type, 'genesis-simple-sidebars' ) || $type == 'post' || $type == 'page' ) {
- add_meta_box('ss_inpost_metabox', __('Sidebar Selection', 'genesis'), 'ss_inpost_metabox', $type, 'side', 'low');
+ add_meta_box('ss_inpost_metabox', __('Sidebar Selection', 'ss'), 'ss_inpost_metabox', $type, 'side', 'low');
}
}
}
@@ -29,7 +29,14 @@ function ss_inpost_metabox() {
?>
-
+