Version Description
- Added bulk sidebars edit.
- Fixed category archive and entry in category replaceable.
- Visibility of "Custom Explain" link is limited only to front-end.
Download this release
Release Info
| Developer | iworks |
| Plugin | |
| Version | 3.0.8 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.7.1 to 3.0.8
- css/cs-cloning.min.css +1 -1
- css/cs-scan.min.css +1 -1
- css/cs-visibility.min.css +1 -1
- css/cs.min.css +1 -1
- customsidebars.php +1 -1
- inc/class-custom-sidebars-editor.php +111 -39
- inc/class-custom-sidebars-explain.php +27 -7
- inc/class-custom-sidebars-replacer.php +22 -20
- js/cs-cloning.js +1 -1
- js/cs-cloning.min.js +1 -1
- js/cs-visibility.js +1 -1
- js/cs-visibility.min.js +1 -1
- js/cs.js +1 -1
- js/cs.min.js +1 -1
- lang/custom-sidebars.pot +35 -35
- readme.txt +7 -2
- views/bulk-edit.php +49 -0
css/cs-cloning.min.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
css/cs-scan.min.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
css/cs-visibility.min.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
css/cs.min.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
customsidebars.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: Custom Sidebars
|
| 4 |
* Plugin URI: https://wordpress.org/plugins/custom-sidebars/
|
| 5 |
* Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
|
| 6 |
-
* Version: 3.0.
|
| 7 |
* Author: WPMU DEV
|
| 8 |
* Author URI: http://premium.wpmudev.org/
|
| 9 |
* Textdomain: custom-sidebars
|
| 3 |
* Plugin Name: Custom Sidebars
|
| 4 |
* Plugin URI: https://wordpress.org/plugins/custom-sidebars/
|
| 5 |
* Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
|
| 6 |
+
* Version: 3.0.8
|
| 7 |
* Author: WPMU DEV
|
| 8 |
* Author URI: http://premium.wpmudev.org/
|
| 9 |
* Textdomain: custom-sidebars
|
inc/class-custom-sidebars-editor.php
CHANGED
|
@@ -7,6 +7,8 @@ add_action( 'cs_init', array( 'CustomSidebarsEditor', 'instance' ) );
|
|
| 7 |
*/
|
| 8 |
class CustomSidebarsEditor extends CustomSidebars {
|
| 9 |
|
|
|
|
|
|
|
| 10 |
/**
|
| 11 |
* Returns the singleton object.
|
| 12 |
*
|
|
@@ -28,54 +30,58 @@ class CustomSidebarsEditor extends CustomSidebars {
|
|
| 28 |
* @since 2.0
|
| 29 |
*/
|
| 30 |
private function __construct() {
|
| 31 |
-
if ( is_admin() ) {
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
add_action(
|
| 40 |
-
'save_post',
|
| 41 |
-
array( $this, 'store_replacements' )
|
| 42 |
-
);
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
array( $this, 'post_columns' )
|
| 56 |
-
);
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
add_filter( 'default_hidden_columns', array( $this, 'default_hidden_columns' ), 10, 2 );
|
| 66 |
|
| 67 |
add_action(
|
| 68 |
-
'
|
| 69 |
-
array( $this, '
|
| 70 |
10, 2
|
| 71 |
);
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
array( $this, 'post_quick_edit_js' )
|
| 76 |
-
);
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
/**
|
|
@@ -811,6 +817,13 @@ class CustomSidebarsEditor extends CustomSidebars {
|
|
| 811 |
include CSB_VIEWS_DIR . 'quick-edit.php';
|
| 812 |
break;
|
| 813 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 814 |
default:
|
| 815 |
include CSB_VIEWS_DIR . 'metabox.php';
|
| 816 |
break;
|
|
@@ -1137,4 +1150,63 @@ class CustomSidebarsEditor extends CustomSidebars {
|
|
| 1137 |
}
|
| 1138 |
return $hidden;
|
| 1139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1140 |
};
|
| 7 |
*/
|
| 8 |
class CustomSidebarsEditor extends CustomSidebars {
|
| 9 |
|
| 10 |
+
private $modifiable = null;
|
| 11 |
+
|
| 12 |
/**
|
| 13 |
* Returns the singleton object.
|
| 14 |
*
|
| 30 |
* @since 2.0
|
| 31 |
*/
|
| 32 |
private function __construct() {
|
| 33 |
+
if ( ! is_admin() ) {
|
| 34 |
+
return;
|
| 35 |
+
}
|
| 36 |
+
// Add the sidebar metabox to posts.
|
| 37 |
+
add_action(
|
| 38 |
+
'add_meta_boxes',
|
| 39 |
+
array( $this, 'add_meta_box' )
|
| 40 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
// Save the options from the sidebars-metabox.
|
| 43 |
+
add_action(
|
| 44 |
+
'save_post',
|
| 45 |
+
array( $this, 'store_replacements' )
|
| 46 |
+
);
|
| 47 |
|
| 48 |
+
// Handle ajax requests.
|
| 49 |
+
add_action(
|
| 50 |
+
'cs_ajax_request',
|
| 51 |
+
array( $this, 'handle_ajax' )
|
| 52 |
+
);
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
// Add a custom column to post list.
|
| 55 |
+
$posttypes = self::get_post_types( 'objects' );
|
| 56 |
+
foreach ( $posttypes as $pt ) {
|
| 57 |
+
add_filter(
|
| 58 |
+
'manage_' . $pt->name . '_posts_columns',
|
| 59 |
+
array( $this, 'post_columns' )
|
| 60 |
+
);
|
|
|
|
| 61 |
|
| 62 |
add_action(
|
| 63 |
+
'manage_' . $pt->name . '_posts_custom_column',
|
| 64 |
+
array( $this, 'post_column_content' ),
|
| 65 |
10, 2
|
| 66 |
);
|
| 67 |
+
}
|
| 68 |
+
/** This action is documented in wp-admin/includes/screen.php */
|
| 69 |
+
add_filter( 'default_hidden_columns', array( $this, 'default_hidden_columns' ), 10, 2 );
|
| 70 |
|
| 71 |
+
add_action( 'quick_edit_custom_box', array( $this, 'post_quick_edit' ), 10, 2 );
|
| 72 |
+
add_action( 'bulk_edit_custom_box', array( $this, 'post_bulk_edit' ), 10, 2 );
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
add_action(
|
| 75 |
+
'admin_footer',
|
| 76 |
+
array( $this, 'post_quick_edit_js' )
|
| 77 |
+
);
|
| 78 |
+
|
| 79 |
+
/**
|
| 80 |
+
* Bulk Edit save
|
| 81 |
+
*
|
| 82 |
+
* @since 3.0.8
|
| 83 |
+
*/
|
| 84 |
+
add_action( 'save_post', array( $this, 'bulk_edit_save' ) );
|
| 85 |
}
|
| 86 |
|
| 87 |
/**
|
| 817 |
include CSB_VIEWS_DIR . 'quick-edit.php';
|
| 818 |
break;
|
| 819 |
|
| 820 |
+
case 'bulk-edit':
|
| 821 |
+
/**
|
| 822 |
+
* @since 3.0.8
|
| 823 |
+
*/
|
| 824 |
+
include CSB_VIEWS_DIR . 'bulk-edit.php';
|
| 825 |
+
break;
|
| 826 |
+
|
| 827 |
default:
|
| 828 |
include CSB_VIEWS_DIR . 'metabox.php';
|
| 829 |
break;
|
| 1150 |
}
|
| 1151 |
return $hidden;
|
| 1152 |
}
|
| 1153 |
+
|
| 1154 |
+
/**
|
| 1155 |
+
* Adds a custom field to the bulk-edit box to select custom columns.
|
| 1156 |
+
*
|
| 1157 |
+
* @since 3.0.8
|
| 1158 |
+
* @param string $column_name Column-Key defined in post_columns above.
|
| 1159 |
+
* @param string $post_type Post-type that is currently edited.
|
| 1160 |
+
*/
|
| 1161 |
+
public function post_bulk_edit( $column_name, $post_type ) {
|
| 1162 |
+
if ( ! self::supported_post_type( $post_type ) ) { return false; }
|
| 1163 |
+
switch ( $column_name ) {
|
| 1164 |
+
case 'cs_replacement':
|
| 1165 |
+
$this->print_metabox_bulk();
|
| 1166 |
+
break;
|
| 1167 |
+
}
|
| 1168 |
+
}
|
| 1169 |
+
|
| 1170 |
+
/**
|
| 1171 |
+
* Renders the sidebar-fields inside the bulk-edit form.
|
| 1172 |
+
*
|
| 1173 |
+
* @since 3.0.8
|
| 1174 |
+
*/
|
| 1175 |
+
public function print_metabox_bulk() {
|
| 1176 |
+
$this->print_sidebars_form( 0, 'bulk-edit' );
|
| 1177 |
+
}
|
| 1178 |
+
|
| 1179 |
+
/**
|
| 1180 |
+
* Bulk Edit save
|
| 1181 |
+
*
|
| 1182 |
+
* @since 3.0.8
|
| 1183 |
+
*/
|
| 1184 |
+
public function bulk_edit_save( $post_id ) {
|
| 1185 |
+
if ( ! isset( $_REQUEST['custom-sidebars-editor-bulk-edit'] ) ) {
|
| 1186 |
+
return;
|
| 1187 |
+
}
|
| 1188 |
+
if ( ! wp_verify_nonce( $_REQUEST['custom-sidebars-editor-bulk-edit'], 'bulk-edit-cs' ) ) {
|
| 1189 |
+
return;
|
| 1190 |
+
}
|
| 1191 |
+
if ( null == $this->modifiable ) {
|
| 1192 |
+
$this->modifiable = CustomSidebars::get_options( 'modifiable' );
|
| 1193 |
+
}
|
| 1194 |
+
if ( empty( $this->modifiable ) ) {
|
| 1195 |
+
return;
|
| 1196 |
+
}
|
| 1197 |
+
$update = false;
|
| 1198 |
+
$data = CustomSidebars::get_post_meta( $post_id );
|
| 1199 |
+
foreach ( $this->modifiable as $key ) {
|
| 1200 |
+
$k = sprintf( 'cs_replacement_%s', $key );
|
| 1201 |
+
$value = isset( $_REQUEST[ $k ] )? $_REQUEST[ $k ]:'-';
|
| 1202 |
+
if ( '-' != $value ) {
|
| 1203 |
+
$update = true;
|
| 1204 |
+
$data[ $key ] = $value;
|
| 1205 |
+
}
|
| 1206 |
+
}
|
| 1207 |
+
if ( ! $update ) {
|
| 1208 |
+
return;
|
| 1209 |
+
}
|
| 1210 |
+
CustomSidebars::set_post_meta( $post_id, $data );
|
| 1211 |
+
}
|
| 1212 |
};
|
inc/class-custom-sidebars-explain.php
CHANGED
|
@@ -80,10 +80,11 @@ class CustomSidebarsExplain extends CustomSidebars {
|
|
| 80 |
if ( is_admin() ) {
|
| 81 |
return;
|
| 82 |
}
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
| 87 |
}
|
| 88 |
|
| 89 |
/**
|
|
@@ -207,23 +208,30 @@ class CustomSidebarsExplain extends CustomSidebars {
|
|
| 207 |
<?php
|
| 208 |
}
|
| 209 |
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
public function admin_bar_menu( $wp_admin_bar ) {
|
|
|
|
|
|
|
|
|
|
| 212 |
if ( ! current_user_can( 'manage_options' ) ) {
|
| 213 |
return;
|
| 214 |
}
|
| 215 |
$args = array(
|
| 216 |
'id' => 'cs-explain',
|
| 217 |
-
'title' => __( '
|
| 218 |
'href' => add_query_arg( 'cs-explain', 'on' ),
|
| 219 |
'parent' => 'top-secondary',
|
| 220 |
'meta' => array(
|
| 221 |
'title' => __( 'Turn on Custom Sidebars explain mode.', 'custom-sidebars' ),
|
|
|
|
| 222 |
),
|
| 223 |
);
|
| 224 |
if ( $this->debug ) {
|
| 225 |
$args['href'] = add_query_arg( 'cs-explain', 'off' );
|
| 226 |
-
$args['title'] = __( 'Turn off explanations', 'custom-sidebars' );
|
| 227 |
$args['meta'] = array(
|
| 228 |
'title' => __( 'Turn off Custom Sidebars explain mode.', 'custom-sidebars' ),
|
| 229 |
'class' => 'cs-explain-on',
|
|
@@ -231,4 +239,16 @@ class CustomSidebarsExplain extends CustomSidebars {
|
|
| 231 |
}
|
| 232 |
$wp_admin_bar->add_node( $args );
|
| 233 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
};
|
| 80 |
if ( is_admin() ) {
|
| 81 |
return;
|
| 82 |
}
|
| 83 |
+
add_action( 'cs_explain', array( $this, 'add_info' ), 10, 2 );
|
| 84 |
+
add_action( 'wp_footer', array( $this, 'show_infos' ) );
|
| 85 |
+
add_action( 'dynamic_sidebar_before', array( $this, 'before_sidebar' ), 0, 2 );
|
| 86 |
+
add_action( 'dynamic_sidebar_after', array( $this, 'after_sidebar' ), 0, 2 );
|
| 87 |
+
add_action( 'wp_print_styles', array( $this, 'print_styles' ) );
|
| 88 |
}
|
| 89 |
|
| 90 |
/**
|
| 208 |
<?php
|
| 209 |
}
|
| 210 |
|
| 211 |
+
/**
|
| 212 |
+
* Added adminbar position for debug
|
| 213 |
+
*
|
| 214 |
+
* @since 3.0.7
|
| 215 |
+
*/
|
| 216 |
public function admin_bar_menu( $wp_admin_bar ) {
|
| 217 |
+
if ( is_admin() ) {
|
| 218 |
+
return;
|
| 219 |
+
}
|
| 220 |
if ( ! current_user_can( 'manage_options' ) ) {
|
| 221 |
return;
|
| 222 |
}
|
| 223 |
$args = array(
|
| 224 |
'id' => 'cs-explain',
|
| 225 |
+
'title' => __( 'Sidebar Debug', 'custom-sidebars' ),
|
| 226 |
'href' => add_query_arg( 'cs-explain', 'on' ),
|
| 227 |
'parent' => 'top-secondary',
|
| 228 |
'meta' => array(
|
| 229 |
'title' => __( 'Turn on Custom Sidebars explain mode.', 'custom-sidebars' ),
|
| 230 |
+
'class' => 'debug-is-off',
|
| 231 |
),
|
| 232 |
);
|
| 233 |
if ( $this->debug ) {
|
| 234 |
$args['href'] = add_query_arg( 'cs-explain', 'off' );
|
|
|
|
| 235 |
$args['meta'] = array(
|
| 236 |
'title' => __( 'Turn off Custom Sidebars explain mode.', 'custom-sidebars' ),
|
| 237 |
'class' => 'cs-explain-on',
|
| 239 |
}
|
| 240 |
$wp_admin_bar->add_node( $args );
|
| 241 |
}
|
| 242 |
+
|
| 243 |
+
/**
|
| 244 |
+
* Print style for debug
|
| 245 |
+
*
|
| 246 |
+
* @since 3.0.8
|
| 247 |
+
*/
|
| 248 |
+
public function print_styles() {
|
| 249 |
+
echo '<style type="text/css" media="screen">';
|
| 250 |
+
echo '#wpadminbar .cs-explain-on{ background-color:#050}';
|
| 251 |
+
echo 'html body #wpadminbar .ab-top-menu .cs-explain-on:hover>.ab-item{background-color:#251}';
|
| 252 |
+
echo '</style>';
|
| 253 |
+
}
|
| 254 |
};
|
inc/class-custom-sidebars-replacer.php
CHANGED
|
@@ -279,20 +279,34 @@ class CustomSidebarsReplacer extends CustomSidebars {
|
|
| 279 |
// 2 |== Category archive ----------------------------------------------
|
| 280 |
|
| 281 |
$expl && do_action( 'cs_explain', 'Type 2: Category Archive' );
|
| 282 |
-
|
| 283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
$category_object = get_queried_object();
|
| 285 |
$current_category = $category_object->term_id;
|
| 286 |
-
|
|
|
|
| 287 |
foreach ( $sidebars as $sb_id ) {
|
| 288 |
if (
|
| 289 |
-
isset( $options['
|
| 290 |
-
&& isset( $options['
|
| 291 |
-
&& isset( $options['
|
| 292 |
) {
|
| 293 |
$replacements[ $sb_id ] = array(
|
| 294 |
-
$options['
|
| 295 |
-
'
|
| 296 |
$current_category,
|
| 297 |
);
|
| 298 |
}
|
|
@@ -302,18 +316,6 @@ class CustomSidebarsReplacer extends CustomSidebars {
|
|
| 302 |
$category_object = get_category( $current_category );
|
| 303 |
}
|
| 304 |
}
|
| 305 |
-
/**
|
| 306 |
-
* Category archive
|
| 307 |
-
*/
|
| 308 |
-
foreach ( $sidebars as $sb_id ) {
|
| 309 |
-
if ( ! $replacements[ $sb_id ] && isset( $options['category_archive'][ $sb_id ] ) ) {
|
| 310 |
-
$replacements[ $sb_id ] = array(
|
| 311 |
-
$options['category_archive'][ $sb_id ],
|
| 312 |
-
'category_archive',
|
| 313 |
-
0,
|
| 314 |
-
);
|
| 315 |
-
}
|
| 316 |
-
}
|
| 317 |
} elseif ( is_search() ) {
|
| 318 |
// 3 |== Search --------------------------------------------------------
|
| 319 |
// Must be before the post-type archive section; otherwise a search with
|
| 279 |
// 2 |== Category archive ----------------------------------------------
|
| 280 |
|
| 281 |
$expl && do_action( 'cs_explain', 'Type 2: Category Archive' );
|
| 282 |
+
/**
|
| 283 |
+
* 2.1 Category archive
|
| 284 |
+
*/
|
| 285 |
+
foreach ( $sidebars as $sb_id ) {
|
| 286 |
+
if ( ! $replacements[ $sb_id ] && isset( $options['category_archive'][ $sb_id ] ) ) {
|
| 287 |
+
$replacements[ $sb_id ] = array(
|
| 288 |
+
$options['category_archive'][ $sb_id ],
|
| 289 |
+
'category_archive',
|
| 290 |
+
0,
|
| 291 |
+
);
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
/**
|
| 295 |
+
* 2.2 Start at current category and travel up all parents
|
| 296 |
+
*/
|
| 297 |
$category_object = get_queried_object();
|
| 298 |
$current_category = $category_object->term_id;
|
| 299 |
+
|
| 300 |
+
if ( 0 != $current_category && $replacements_todo > 0 ) {
|
| 301 |
foreach ( $sidebars as $sb_id ) {
|
| 302 |
if (
|
| 303 |
+
isset( $options['category_archive'] )
|
| 304 |
+
&& isset( $options['category_archive'][ $current_category ] )
|
| 305 |
+
&& isset( $options['category_archive'][ $current_category ][ $sb_id ] )
|
| 306 |
) {
|
| 307 |
$replacements[ $sb_id ] = array(
|
| 308 |
+
$options['category_archive'][ $current_category ][ $sb_id ],
|
| 309 |
+
'category_archive',
|
| 310 |
$current_category,
|
| 311 |
);
|
| 312 |
}
|
| 316 |
$category_object = get_category( $current_category );
|
| 317 |
}
|
| 318 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
} elseif ( is_search() ) {
|
| 320 |
// 3 |== Search --------------------------------------------------------
|
| 321 |
// Must be before the post-type archive section; otherwise a search with
|
js/cs-cloning.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global jQuery:false */
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global jQuery:false */
|
js/cs-cloning.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
js/cs-visibility.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global jQuery:false */
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global jQuery:false */
|
js/cs-visibility.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
js/cs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global window:false */
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
/*global window:false */
|
js/cs.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
/*! Custom Sidebars - v3.0.
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
| 1 |
+
/*! Custom Sidebars - v3.0.8
|
| 2 |
* https://premium.wpmudev.org/project/custom-sidebars-pro/
|
| 3 |
* Copyright (c) 2017; * Licensed GPLv2+ */
|
| 4 |
|
lang/custom-sidebars.pot
CHANGED
|
@@ -4,7 +4,7 @@ msgid ""
|
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: Custom Sidebars Pro PLUGIN_VERSION\n"
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customsidebars\n"
|
| 7 |
-
"POT-Creation-Date: 2017-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -60,103 +60,99 @@ msgstr ""
|
|
| 60 |
msgid "Clone"
|
| 61 |
msgstr ""
|
| 62 |
|
| 63 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 64 |
#: inc/class-custom-sidebars-export.php:97
|
| 65 |
msgid "You do not have permission for this"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 69 |
msgid "Sidebar-name cannot be empty"
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 73 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 74 |
msgid "The sidebar does not exist"
|
| 75 |
msgstr ""
|
| 76 |
|
| 77 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 78 |
msgid "Created new sidebar <strong>%1$s</strong>"
|
| 79 |
msgstr ""
|
| 80 |
|
| 81 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 82 |
msgid "Updated sidebar <strong>%1$s</strong>"
|
| 83 |
msgstr ""
|
| 84 |
|
| 85 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 86 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 87 |
msgid "The sidebar was not found"
|
| 88 |
msgstr ""
|
| 89 |
|
| 90 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 91 |
msgid "Deleted sidebar <strong>%1$s</strong>"
|
| 92 |
msgstr ""
|
| 93 |
|
| 94 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 95 |
msgid "Front Page"
|
| 96 |
msgstr ""
|
| 97 |
|
| 98 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 99 |
msgid "Search Results"
|
| 100 |
msgstr ""
|
| 101 |
|
| 102 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 103 |
#: inc/class-custom-sidebars-visibility.php:158
|
| 104 |
msgid "Not found (404)"
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 108 |
msgid "Any Author Archive"
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 112 |
msgid "Date Archives"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 116 |
-
#: inc/class-custom-sidebars-editor.php:410
|
| 117 |
#: inc/class-custom-sidebars-editor.php:416
|
| 118 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 119 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 120 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 121 |
-
#: inc/class-custom-sidebars-editor.php:
|
|
|
|
| 122 |
msgid "%s Archives"
|
| 123 |
msgstr ""
|
| 124 |
|
| 125 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 126 |
#: inc/class-custom-sidebars-visibility.php:153
|
| 127 |
msgid "Post Index"
|
| 128 |
msgstr ""
|
| 129 |
|
| 130 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 131 |
msgid "%1$s Archives"
|
| 132 |
msgstr ""
|
| 133 |
|
| 134 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 135 |
msgid "Updated sidebar <strong>%1$s</strong> settings."
|
| 136 |
msgstr ""
|
| 137 |
|
| 138 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 139 |
msgid "Sidebars"
|
| 140 |
msgstr ""
|
| 141 |
|
| 142 |
-
#: inc/class-custom-sidebars-editor.php:
|
| 143 |
-
#: views/widgets.php:47
|
| 144 |
msgid "Custom Sidebars"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
-
#: inc/class-custom-sidebars-explain.php:
|
| 148 |
-
msgid "
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
-
#: inc/class-custom-sidebars-explain.php:
|
| 152 |
msgid "Turn on Custom Sidebars explain mode."
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
-
#: inc/class-custom-sidebars-explain.php:
|
| 156 |
-
msgid "Turn off explanations"
|
| 157 |
-
msgstr ""
|
| 158 |
-
|
| 159 |
-
#: inc/class-custom-sidebars-explain.php:228
|
| 160 |
msgid "Turn off Custom Sidebars explain mode."
|
| 161 |
msgstr ""
|
| 162 |
|
|
@@ -348,6 +344,10 @@ msgstr ""
|
|
| 348 |
msgid "Create a custom sidebar to get started."
|
| 349 |
msgstr ""
|
| 350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 351 |
#: views/col-sidebars.php:18
|
| 352 |
msgid "(Not available for Home-Page)"
|
| 353 |
msgstr ""
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: Custom Sidebars Pro PLUGIN_VERSION\n"
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customsidebars\n"
|
| 7 |
+
"POT-Creation-Date: 2017-06-08 05:46:56+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 60 |
msgid "Clone"
|
| 61 |
msgstr ""
|
| 62 |
|
| 63 |
+
#: inc/class-custom-sidebars-editor.php:127
|
| 64 |
#: inc/class-custom-sidebars-export.php:97
|
| 65 |
msgid "You do not have permission for this"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
+
#: inc/class-custom-sidebars-editor.php:202
|
| 69 |
msgid "Sidebar-name cannot be empty"
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
+
#: inc/class-custom-sidebars-editor.php:226
|
| 73 |
+
#: inc/class-custom-sidebars-editor.php:309
|
| 74 |
msgid "The sidebar does not exist"
|
| 75 |
msgstr ""
|
| 76 |
|
| 77 |
+
#: inc/class-custom-sidebars-editor.php:257
|
| 78 |
msgid "Created new sidebar <strong>%1$s</strong>"
|
| 79 |
msgstr ""
|
| 80 |
|
| 81 |
+
#: inc/class-custom-sidebars-editor.php:265
|
| 82 |
msgid "Updated sidebar <strong>%1$s</strong>"
|
| 83 |
msgstr ""
|
| 84 |
|
| 85 |
+
#: inc/class-custom-sidebars-editor.php:276
|
| 86 |
+
#: inc/class-custom-sidebars-editor.php:329
|
| 87 |
msgid "The sidebar was not found"
|
| 88 |
msgstr ""
|
| 89 |
|
| 90 |
+
#: inc/class-custom-sidebars-editor.php:318
|
| 91 |
msgid "Deleted sidebar <strong>%1$s</strong>"
|
| 92 |
msgstr ""
|
| 93 |
|
| 94 |
+
#: inc/class-custom-sidebars-editor.php:391
|
| 95 |
msgid "Front Page"
|
| 96 |
msgstr ""
|
| 97 |
|
| 98 |
+
#: inc/class-custom-sidebars-editor.php:392
|
| 99 |
msgid "Search Results"
|
| 100 |
msgstr ""
|
| 101 |
|
| 102 |
+
#: inc/class-custom-sidebars-editor.php:393
|
| 103 |
#: inc/class-custom-sidebars-visibility.php:158
|
| 104 |
msgid "Not found (404)"
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
+
#: inc/class-custom-sidebars-editor.php:394
|
| 108 |
msgid "Any Author Archive"
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
+
#: inc/class-custom-sidebars-editor.php:395
|
| 112 |
msgid "Date Archives"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
+
#: inc/class-custom-sidebars-editor.php:413
|
|
|
|
| 116 |
#: inc/class-custom-sidebars-editor.php:416
|
| 117 |
+
#: inc/class-custom-sidebars-editor.php:422
|
| 118 |
+
#: inc/class-custom-sidebars-editor.php:424
|
| 119 |
+
#: inc/class-custom-sidebars-editor.php:508
|
| 120 |
+
#: inc/class-custom-sidebars-editor.php:510
|
| 121 |
+
#: inc/class-custom-sidebars-editor.php:529
|
| 122 |
msgid "%s Archives"
|
| 123 |
msgstr ""
|
| 124 |
|
| 125 |
+
#: inc/class-custom-sidebars-editor.php:471
|
| 126 |
#: inc/class-custom-sidebars-visibility.php:153
|
| 127 |
msgid "Post Index"
|
| 128 |
msgstr ""
|
| 129 |
|
| 130 |
+
#: inc/class-custom-sidebars-editor.php:475
|
| 131 |
msgid "%1$s Archives"
|
| 132 |
msgstr ""
|
| 133 |
|
| 134 |
+
#: inc/class-custom-sidebars-editor.php:730
|
| 135 |
msgid "Updated sidebar <strong>%1$s</strong> settings."
|
| 136 |
msgstr ""
|
| 137 |
|
| 138 |
+
#: inc/class-custom-sidebars-editor.php:766 views/widgets.php:17
|
| 139 |
msgid "Sidebars"
|
| 140 |
msgstr ""
|
| 141 |
|
| 142 |
+
#: inc/class-custom-sidebars-editor.php:1025 views/bulk-edit.php:23
|
| 143 |
+
#: views/import.php:123 views/widgets.php:47
|
| 144 |
msgid "Custom Sidebars"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
+
#: inc/class-custom-sidebars-explain.php:225
|
| 148 |
+
msgid "Sidebar Debug"
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
+
#: inc/class-custom-sidebars-explain.php:229
|
| 152 |
msgid "Turn on Custom Sidebars explain mode."
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
+
#: inc/class-custom-sidebars-explain.php:236
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
msgid "Turn off Custom Sidebars explain mode."
|
| 157 |
msgstr ""
|
| 158 |
|
| 344 |
msgid "Create a custom sidebar to get started."
|
| 345 |
msgstr ""
|
| 346 |
|
| 347 |
+
#: views/bulk-edit.php:35
|
| 348 |
+
msgid "— No Change —"
|
| 349 |
+
msgstr ""
|
| 350 |
+
|
| 351 |
#: views/col-sidebars.php:18
|
| 352 |
msgid "(Not available for Home-Page)"
|
| 353 |
msgstr ""
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: WPMUDEV, marquex, WPMUDEV-Support2, WPMUDEV-Support1, WPMUDEV-Supp
|
|
| 3 |
Tags: sidebar, widget, footer, custom, flexible layout, dynamic widgets, manage sidebars, replace widgets, custom widget area
|
| 4 |
Requires at least: 3.6
|
| 5 |
Tested up to: 4.8
|
| 6 |
-
Stable tag: 3.0.
|
| 7 |
|
| 8 |
Flexible sidebars for custom widget configurations on every page, post and custom post type on your site.
|
| 9 |
|
|
@@ -120,6 +120,11 @@ If you are running a earlier version of WordPress download Custom Sidebars 0.8.2
|
|
| 120 |
|
| 121 |
== Changelog ==
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
= 3.0.7.1 =
|
| 124 |
* Fixed visibility of Custom Explain - now it is visible only for administrators.
|
| 125 |
|
|
@@ -166,7 +171,7 @@ If you are running a earlier version of WordPress download Custom Sidebars 0.8.2
|
|
| 166 |
* Show advertising for "WP Checkup" in the whole admin area.
|
| 167 |
|
| 168 |
= 3.0.0.1 =
|
| 169 |
-
* Fixed a problem with wp_enqueue_script
|
| 170 |
* Fixed a problem with advertising, which should stay close when you close it.
|
| 171 |
|
| 172 |
= 3.0.0.0 =
|
| 3 |
Tags: sidebar, widget, footer, custom, flexible layout, dynamic widgets, manage sidebars, replace widgets, custom widget area
|
| 4 |
Requires at least: 3.6
|
| 5 |
Tested up to: 4.8
|
| 6 |
+
Stable tag: 3.0.8
|
| 7 |
|
| 8 |
Flexible sidebars for custom widget configurations on every page, post and custom post type on your site.
|
| 9 |
|
| 120 |
|
| 121 |
== Changelog ==
|
| 122 |
|
| 123 |
+
= 3.0.8 =
|
| 124 |
+
* Added bulk sidebars edit.
|
| 125 |
+
* Fixed category archive and entry in category replaceable.
|
| 126 |
+
* Visibility of "Custom Explain" link is limited only to front-end.
|
| 127 |
+
|
| 128 |
= 3.0.7.1 =
|
| 129 |
* Fixed visibility of Custom Explain - now it is visible only for administrators.
|
| 130 |
|
| 171 |
* Show advertising for "WP Checkup" in the whole admin area.
|
| 172 |
|
| 173 |
= 3.0.0.1 =
|
| 174 |
+
* Fixed a problem with wp_enqueue_script which was called too early.
|
| 175 |
* Fixed a problem with advertising, which should stay close when you close it.
|
| 176 |
|
| 177 |
= 3.0.0.0 =
|
views/bulk-edit.php
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Form displayed in the Quick Edit box of the post list.
|
| 4 |
+
*
|
| 5 |
+
* Uses:
|
| 6 |
+
* $selected
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
global $wp_registered_sidebars;
|
| 10 |
+
$available = CustomSidebars::sort_sidebars_by_name( $wp_registered_sidebars );
|
| 11 |
+
|
| 12 |
+
$sidebars = CustomSidebars::get_options( 'modifiable' );
|
| 13 |
+
static $print_nonce = true;
|
| 14 |
+
|
| 15 |
+
if ( $print_nonce ) {
|
| 16 |
+
$print_nonce = false;
|
| 17 |
+
wp_nonce_field( 'bulk-edit-cs', 'custom-sidebars-editor-bulk-edit' );
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
?>
|
| 21 |
+
<fieldset class="inline-edit-col-left cs-quickedit">
|
| 22 |
+
<div class="inline-edit-col">
|
| 23 |
+
<label><?php _e( 'Custom Sidebars', 'ub' ); ?></label>
|
| 24 |
+
<?php
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
foreach ( $sidebars as $s ) {
|
| 28 |
+
$sb_name = $available[ $s ]['name'];
|
| 29 |
+
?>
|
| 30 |
+
<div class="inline-edit-group">
|
| 31 |
+
<label>
|
| 32 |
+
<span class="title"><?php echo esc_html( $sb_name ); ?></span>
|
| 33 |
+
<select name="cs_replacement_<?php echo esc_attr( $s ); ?>"
|
| 34 |
+
class="cs-replacement-field <?php echo esc_attr( $s ); ?>">
|
| 35 |
+
<option value="-"><?php _e( '— No Change —', 'ub' ); ?></option>
|
| 36 |
+
<?php foreach ( $available as $a ) : ?>
|
| 37 |
+
<option value="<?php echo esc_attr( $a['id'] ); ?>" <?php selected( $selected[ $s ], $a['id'] ); ?>>
|
| 38 |
+
<?php echo esc_html( $a['name'] ); ?>
|
| 39 |
+
</option>
|
| 40 |
+
<?php endforeach; ?>
|
| 41 |
+
</select>
|
| 42 |
+
</label>
|
| 43 |
+
</div>
|
| 44 |
+
<?php
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
?>
|
| 48 |
+
</div>
|
| 49 |
+
</fieldset>
|
