Version Description
- [fixed] toolbar menu compatibility with php5.6
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 3.15.1 |
Comparing to | |
See all releases |
Code changes from version 3.15 to 3.15.1
- admin/admin.php +1 -1
- admin/admin_bar.php +1 -1
- admin/db-updates.php +2 -0
- admin/quick_select.php +1 -1
- admin/sidebar-edit.php +4 -8
- app.php +2 -2
- content-aware-sidebars.php +1 -1
- readme.txt +5 -1
- sidebar.php +1 -0
- view/meta_box_design.php +1 -1
- view/meta_box_support.php +5 -5
admin/admin.php
CHANGED
@@ -155,7 +155,7 @@ abstract class CAS_Admin
|
|
155 |
if ($tour_taken && (time() - $tour_taken) >= WEEK_IN_SECONDS) {
|
156 |
$this->notification_count++;
|
157 |
$path = plugin_dir_path(dirname(__FILE__)).'view/';
|
158 |
-
|
159 |
'current_user' => wp_get_current_user()
|
160 |
])->render();
|
161 |
}
|
155 |
if ($tour_taken && (time() - $tour_taken) >= WEEK_IN_SECONDS) {
|
156 |
$this->notification_count++;
|
157 |
$path = plugin_dir_path(dirname(__FILE__)).'view/';
|
158 |
+
WPCAView::make($path.'notice_review.php', [
|
159 |
'current_user' => wp_get_current_user()
|
160 |
])->render();
|
161 |
}
|
admin/admin_bar.php
CHANGED
@@ -132,7 +132,7 @@ class CAS_Admin_Bar
|
|
132 |
foreach (WPCACore::get_conditional_modules('sidebar') as $module) {
|
133 |
$title = $module->get_name();
|
134 |
$link = '';
|
135 |
-
if (
|
136 |
$title .= ' <span class="ab-icon dashicons dashicons-external"></span>';
|
137 |
$link = self::DOCS_MAP[$module->get_id()].'?utm_source=plugin&utm_medium=admin_bar&utm_campaign=cas';
|
138 |
}
|
132 |
foreach (WPCACore::get_conditional_modules('sidebar') as $module) {
|
133 |
$title = $module->get_name();
|
134 |
$link = '';
|
135 |
+
if (array_key_exists($module->get_id(), self::DOCS_MAP)) {
|
136 |
$title .= ' <span class="ab-icon dashicons dashicons-external"></span>';
|
137 |
$link = self::DOCS_MAP[$module->get_id()].'?utm_source=plugin&utm_medium=admin_bar&utm_campaign=cas';
|
138 |
}
|
admin/db-updates.php
CHANGED
@@ -236,6 +236,8 @@ function cas_update_to_30()
|
|
236 |
AND meta_value LIKE '_cas_sub_%'
|
237 |
");
|
238 |
break;
|
|
|
|
|
239 |
}
|
240 |
}
|
241 |
|
236 |
AND meta_value LIKE '_cas_sub_%'
|
237 |
");
|
238 |
break;
|
239 |
+
default:
|
240 |
+
break;
|
241 |
}
|
242 |
}
|
243 |
|
admin/quick_select.php
CHANGED
@@ -208,7 +208,7 @@ class CAS_Quick_Select
|
|
208 |
$host_ids = $host_meta->get_data($sidebar_id, false, false);
|
209 |
foreach ($host_ids as $host_id) {
|
210 |
if (!isset(self::$_theme_sidebars[$host_id])) {
|
211 |
-
continue;
|
212 |
}
|
213 |
}
|
214 |
}
|
208 |
$host_ids = $host_meta->get_data($sidebar_id, false, false);
|
209 |
foreach ($host_ids as $host_id) {
|
210 |
if (!isset(self::$_theme_sidebars[$host_id])) {
|
211 |
+
continue 2;
|
212 |
}
|
213 |
}
|
214 |
}
|
admin/sidebar-edit.php
CHANGED
@@ -314,10 +314,8 @@ final class CAS_Sidebar_Edit extends CAS_Admin
|
|
314 |
global $post, $active_post_lock;
|
315 |
|
316 |
$post_type_object = get_post_type_object($post->post_type);
|
317 |
-
|
318 |
$post_id = isset($_REQUEST['sidebar_id']) ? $_REQUEST['sidebar_id'] : 0;
|
319 |
|
320 |
-
$notice = false;
|
321 |
$form_extra = '';
|
322 |
if ('auto-draft' == $post->post_status) {
|
323 |
if (isset($_REQUEST['sidebar_id'])) {
|
@@ -336,10 +334,8 @@ final class CAS_Sidebar_Edit extends CAS_Admin
|
|
336 |
echo '<h1>';
|
337 |
echo '<a href="'.admin_url('admin.php?page=wpcas').'">'.$post_type_object->labels->all_items.'</a> » ';
|
338 |
echo esc_html($title);
|
339 |
-
if (isset($_REQUEST['sidebar_id'])) {
|
340 |
-
|
341 |
-
echo ' <a href="' . esc_url(admin_url('widgets.php#'.CAS_App::SIDEBAR_PREFIX.$post->ID)) . '" class="page-title-action add-new-h2">' . __('Manage Widgets', 'content-aware-sidebars') . '</a>';
|
342 |
-
}
|
343 |
}
|
344 |
|
345 |
echo '</h1>';
|
@@ -501,7 +497,7 @@ final class CAS_Sidebar_Edit extends CAS_Admin
|
|
501 |
}
|
502 |
|
503 |
update_post_meta($post_ID, '_edit_last', $post_data['post_author']);
|
504 |
-
|
505 |
wp_set_post_lock($post_ID);
|
506 |
|
507 |
return $post_ID;
|
@@ -617,7 +613,7 @@ final class CAS_Sidebar_Edit extends CAS_Admin
|
|
617 |
'2/5 '.__('Where to display', 'content-aware-sidebars'),
|
618 |
'<p>'.__('Click on the input field and select the content you want - just type to search. Changes are saved automatically!', 'content-aware-sidebars').'</p>'.
|
619 |
'<p>'.__('You can add multiple content types to the same group. Try e.g. "All Posts" and an Author to display on all posts written by that author.', 'content-aware-sidebars').'</p>'.
|
620 |
-
'<p>'.sprintf(
|
621 |
),
|
622 |
'ref_id' => '#cas-groups > ul',
|
623 |
'position' => [
|
314 |
global $post, $active_post_lock;
|
315 |
|
316 |
$post_type_object = get_post_type_object($post->post_type);
|
|
|
317 |
$post_id = isset($_REQUEST['sidebar_id']) ? $_REQUEST['sidebar_id'] : 0;
|
318 |
|
|
|
319 |
$form_extra = '';
|
320 |
if ('auto-draft' == $post->post_status) {
|
321 |
if (isset($_REQUEST['sidebar_id'])) {
|
334 |
echo '<h1>';
|
335 |
echo '<a href="'.admin_url('admin.php?page=wpcas').'">'.$post_type_object->labels->all_items.'</a> » ';
|
336 |
echo esc_html($title);
|
337 |
+
if (isset($_REQUEST['sidebar_id']) && current_user_can('edit_theme_options')) {
|
338 |
+
echo ' <a href="' . esc_url(admin_url('widgets.php#'.CAS_App::SIDEBAR_PREFIX.$post->ID)) . '" class="page-title-action add-new-h2">' . __('Manage Widgets', 'content-aware-sidebars') . '</a>';
|
|
|
|
|
339 |
}
|
340 |
|
341 |
echo '</h1>';
|
497 |
}
|
498 |
|
499 |
update_post_meta($post_ID, '_edit_last', $post_data['post_author']);
|
500 |
+
wp_update_post($post_data);
|
501 |
wp_set_post_lock($post_ID);
|
502 |
|
503 |
return $post_ID;
|
613 |
'2/5 '.__('Where to display', 'content-aware-sidebars'),
|
614 |
'<p>'.__('Click on the input field and select the content you want - just type to search. Changes are saved automatically!', 'content-aware-sidebars').'</p>'.
|
615 |
'<p>'.__('You can add multiple content types to the same group. Try e.g. "All Posts" and an Author to display on all posts written by that author.', 'content-aware-sidebars').'</p>'.
|
616 |
+
'<p>'.sprintf('<a href="%s" target="_blank" rel="noopener">'.__('Learn more about AND vs OR conditions', 'content-aware-sidebars').'</a>', 'https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-advanced/').'</p>'
|
617 |
),
|
618 |
'ref_id' => '#cas-groups > ul',
|
619 |
'position' => [
|
app.php
CHANGED
@@ -11,7 +11,7 @@ defined('ABSPATH') || exit;
|
|
11 |
final class CAS_App
|
12 |
{
|
13 |
const PLUGIN_VERSION_KEY = 'cas_db_version';
|
14 |
-
const PLUGIN_VERSION = '3.15';
|
15 |
|
16 |
/**
|
17 |
* Prefix for sidebar id
|
@@ -198,7 +198,7 @@ final class CAS_App
|
|
198 |
|
199 |
$new_actions = [];
|
200 |
|
201 |
-
$new_actions['docs'] = '<a href="https://dev.institute/docs/content-aware-sidebars/?utm_source=plugin&utm_medium=referral&utm_content=plugin-list&utm_campaign=cas" target="_blank">'.__('Docs & FAQ', 'content-aware-sidebars').'</a>';
|
202 |
$new_actions['support'] = '<a href="'.esc_url($cas_fs->contact_url()).'">'.__('Premium Support', 'content-aware-sidebars').'</a>';
|
203 |
|
204 |
if (!$cas_fs->has_active_valid_license()) {
|
11 |
final class CAS_App
|
12 |
{
|
13 |
const PLUGIN_VERSION_KEY = 'cas_db_version';
|
14 |
+
const PLUGIN_VERSION = '3.15.1';
|
15 |
|
16 |
/**
|
17 |
* Prefix for sidebar id
|
198 |
|
199 |
$new_actions = [];
|
200 |
|
201 |
+
$new_actions['docs'] = '<a href="https://dev.institute/docs/content-aware-sidebars/?utm_source=plugin&utm_medium=referral&utm_content=plugin-list&utm_campaign=cas" target="_blank" rel="noopener">'.__('Docs & FAQ', 'content-aware-sidebars').'</a>';
|
202 |
$new_actions['support'] = '<a href="'.esc_url($cas_fs->contact_url()).'">'.__('Premium Support', 'content-aware-sidebars').'</a>';
|
203 |
|
204 |
if (!$cas_fs->has_active_valid_license()) {
|
content-aware-sidebars.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
-
Version: 3.15
|
13 |
Author: Joachim Jensen - DEV Institute
|
14 |
Author URI: https://dev.institute
|
15 |
Requires at least: 4.9
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
Plugin URI: https://dev.institute/wordpress-sidebars/
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
+
Version: 3.15.1
|
13 |
Author: Joachim Jensen - DEV Institute
|
14 |
Author URI: https://dev.institute
|
15 |
Requires at least: 4.9
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress,
|
|
5 |
Requires at least: 4.9
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.6
|
8 |
-
Stable tag: 3.15
|
9 |
License: GPLv3
|
10 |
|
11 |
Display new sidebars and widget areas on any post, page, category etc. Works with all themes, no code required.
|
@@ -184,6 +184,10 @@ Of course! Check out the links below:
|
|
184 |
|
185 |
####Highlights
|
186 |
|
|
|
|
|
|
|
|
|
187 |
= 3.15 =
|
188 |
|
189 |
* [new] toolbar menu to view conditions, theme areas, and sidebars for a given page
|
5 |
Requires at least: 4.9
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.6
|
8 |
+
Stable tag: 3.15.1
|
9 |
License: GPLv3
|
10 |
|
11 |
Display new sidebars and widget areas on any post, page, category etc. Works with all themes, no code required.
|
184 |
|
185 |
####Highlights
|
186 |
|
187 |
+
= 3.15.1 =
|
188 |
+
|
189 |
+
* [fixed] toolbar menu compatibility with php5.6
|
190 |
+
|
191 |
= 3.15 =
|
192 |
|
193 |
* [new] toolbar menu to view conditions, theme areas, and sidebars for a given page
|
sidebar.php
CHANGED
@@ -633,6 +633,7 @@ final class CAS_Sidebar_Manager
|
|
633 |
return;
|
634 |
}
|
635 |
|
|
|
636 |
if ($has_widgets && isset($wp_registered_sidebars[$i]['before_sidebar'])) {
|
637 |
echo $wp_registered_sidebars[$i]['before_sidebar'];
|
638 |
}
|
633 |
return;
|
634 |
}
|
635 |
|
636 |
+
global $wp_registered_sidebars;
|
637 |
if ($has_widgets && isset($wp_registered_sidebars[$i]['before_sidebar'])) {
|
638 |
echo $wp_registered_sidebars[$i]['before_sidebar'];
|
639 |
}
|
view/meta_box_design.php
CHANGED
@@ -29,7 +29,7 @@ $sticky_url = 'https://dev.institute/docs/content-aware-sidebars/faq/sticky-side
|
|
29 |
<div class="cae-toggle-bar"></div>
|
30 |
</label>
|
31 |
<p><a href="<?php echo $sticky_url; ?>"
|
32 |
-
target="_blank"><?php _e('Check Theme Support', 'content-aware-sidebars'); ?></a>
|
33 |
</p>
|
34 |
</td>
|
35 |
</tr>
|
29 |
<div class="cae-toggle-bar"></div>
|
30 |
</label>
|
31 |
<p><a href="<?php echo $sticky_url; ?>"
|
32 |
+
target="_blank" rel="noopener"><?php _e('Check Theme Support', 'content-aware-sidebars'); ?></a>
|
33 |
</p>
|
34 |
</td>
|
35 |
</tr>
|
view/meta_box_support.php
CHANGED
@@ -11,13 +11,13 @@ global $cas_fs;
|
|
11 |
?>
|
12 |
<img class="wpca-pull-right" style="border-radius:3px;" src="<?php echo $cas_fs->get_local_icon_url(); ?>" width="48" height="48" />
|
13 |
<ul>
|
14 |
-
<li><a href="https://dev.institute/docs/content-aware-sidebars/getting-started/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('Get Started', 'content-aware-sidebars'); ?></a></li>
|
15 |
-
<li><a href="https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-advanced/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('Sidebar not displayed where expected?', 'content-aware-sidebars'); ?></a></li>
|
16 |
-
<li><a href="https://dev.institute/docs/content-aware-sidebars/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank"><?php _e('Documentation & FAQ', 'content-aware-sidebars'); ?></a></li>
|
17 |
<?php if (!$cas_fs->can_use_premium_code()) : ?>
|
18 |
-
<li><a href="https://wordpress.org/support/plugin/content-aware-sidebars/" target="_blank"><?php _e('Support Forums', 'content-aware-sidebars'); ?></a></li>
|
19 |
<?php if (stripos($locale, 'en') !== 0) : ?>
|
20 |
-
<li><a href="https://dev.institute/translate-content-aware-sidebars/" target="_blank"><?php _e('Translate plugin & get Pro version', 'content-aware-sidebars'); ?></a></li>
|
21 |
<?php endif; ?>
|
22 |
<li class="wpca-pull-center"><a class="button button-primary" href="<?php echo esc_url(cas_fs()->get_upgrade_url()); ?>"><span class="cas-heart">❤</span> <?php _e('Upgrade to Pro', 'content-aware-sidebars'); ?></a></li>
|
23 |
<?php endif; ?>
|
11 |
?>
|
12 |
<img class="wpca-pull-right" style="border-radius:3px;" src="<?php echo $cas_fs->get_local_icon_url(); ?>" width="48" height="48" />
|
13 |
<ul>
|
14 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/getting-started/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank" rel="noopener"><?php _e('Get Started', 'content-aware-sidebars'); ?></a></li>
|
15 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-advanced/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank" rel="noopener"><?php _e('Sidebar not displayed where expected?', 'content-aware-sidebars'); ?></a></li>
|
16 |
+
<li><a href="https://dev.institute/docs/content-aware-sidebars/?utm_source=plugin&utm_medium=referral&utm_content=info-box&utm_campaign=cas" target="_blank" rel="noopener"><?php _e('Documentation & FAQ', 'content-aware-sidebars'); ?></a></li>
|
17 |
<?php if (!$cas_fs->can_use_premium_code()) : ?>
|
18 |
+
<li><a href="https://wordpress.org/support/plugin/content-aware-sidebars/" target="_blank" rel="noopener"><?php _e('Support Forums', 'content-aware-sidebars'); ?></a></li>
|
19 |
<?php if (stripos($locale, 'en') !== 0) : ?>
|
20 |
+
<li><a href="https://dev.institute/translate-content-aware-sidebars/" target="_blank" rel="noopener"><?php _e('Translate plugin & get Pro version', 'content-aware-sidebars'); ?></a></li>
|
21 |
<?php endif; ?>
|
22 |
<li class="wpca-pull-center"><a class="button button-primary" href="<?php echo esc_url(cas_fs()->get_upgrade_url()); ?>"><span class="cas-heart">❤</span> <?php _e('Upgrade to Pro', 'content-aware-sidebars'); ?></a></li>
|
23 |
<?php endif; ?>
|