Content Aware Sidebars – Unlimited Widget Areas - Version 3.14

Version Description

  • [new] ability to replace or merge with multiple sidebars
  • [new] wordpress 5.6 support
  • [new] minimum wordpress version 4.9
  • [fixed] some custom sidebar styles would not take effect in wp5.6+
  • [updated] wp-content-aware-engine library

Pro Plan:

  • [new] time schedule displayed on overview screen
  • [fixed] conditions would not be duplicated with sidebar
  • [updated] improved time schedule ui
Download this release

Release Info

Developer intoxstudio
Plugin Icon 128x128 Content Aware Sidebars – Unlimited Widget Areas
Version 3.14
Comparing to
See all releases

Code changes from version 3.13.1 to 3.14

admin/admin.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
admin/db-updates.php CHANGED
@@ -16,17 +16,17 @@ $cas_db_updater->register_version_update('3.1', 'cas_update_to_31');
16
  $cas_db_updater->register_version_update('3.4', 'cas_update_to_34');
17
  $cas_db_updater->register_version_update('3.5.1', 'cas_update_to_351');
18
  $cas_db_updater->register_version_update('3.8', 'cas_update_to_38');
19
- $cas_db_updater->register_version_update('3.13.1', 'cas_update_to_3131');
20
 
21
  /**
22
  * Enable legacy date module and
23
  * negated conditions if in use
24
  *
25
- * @since 3.13.1
26
  *
27
  * @return bool
28
  */
29
- function cas_update_to_3131()
30
  {
31
  global $wpdb;
32
 
16
  $cas_db_updater->register_version_update('3.4', 'cas_update_to_34');
17
  $cas_db_updater->register_version_update('3.5.1', 'cas_update_to_351');
18
  $cas_db_updater->register_version_update('3.8', 'cas_update_to_38');
19
+ $cas_db_updater->register_version_update('3.14', 'cas_update_to_314');
20
 
21
  /**
22
  * Enable legacy date module and
23
  * negated conditions if in use
24
  *
25
+ * @since 3.14
26
  *
27
  * @return bool
28
  */
29
+ function cas_update_to_314()
30
  {
31
  global $wpdb;
32
 
admin/quick_select.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
admin/screen_widgets.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
@@ -58,8 +58,19 @@ class CAS_Admin_Screen_Widgets extends CAS_Admin
58
  $args['description'] = $handle_meta->get_list_data($post->ID, true);
59
 
60
  if (isset($has_host[$handle_meta->get_data($post->ID)])) {
61
- $host = $manager->metadata()->get('host')->get_list_data($post->ID, false);
62
- $args['description'] .= ': ' . ($host ? $host : __('Target not found', 'content-aware-sidebars'));
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
 
65
  $wp_registered_sidebars[$id] = array_merge($wp_registered_sidebars[$id], $args);
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
58
  $args['description'] = $handle_meta->get_list_data($post->ID, true);
59
 
60
  if (isset($has_host[$handle_meta->get_data($post->ID)])) {
61
+ $hosts = $manager->metadata()->get('host')->get_data($post->ID, false, false);
62
+ if ($hosts) {
63
+ $list = $manager->metadata()->get('host')->get_input_list();
64
+ $data = [];
65
+ foreach ($hosts as $host) {
66
+ if (!isset($list[$host])) {
67
+ $data[] = __('Target not found', 'content-aware-sidebars');
68
+ } else {
69
+ $data[] = $list[$host];
70
+ }
71
+ }
72
+ $args['description'] .= ': ' . implode(', ', $data);
73
+ }
74
  }
75
 
76
  $wp_registered_sidebars[$id] = array_merge($wp_registered_sidebars[$id], $args);
admin/sidebar-edit.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
@@ -1000,8 +1000,10 @@ final class CAS_Sidebar_Edit extends CAS_Admin
1000
  $this->enqueue_style('flatpickr', 'flatpickr.dark.min', array(), '3.0.6');
1001
  wp_enqueue_style('wp-color-picker');
1002
 
 
1003
  $visibility = array();
1004
- foreach (CAS_App::instance()->_manager->metadata()->get('visibility')->get_input_list() as $category_key => $category) {
 
1005
 
1006
  //legacy format
1007
  if (!is_array($category)) {
@@ -1024,6 +1026,12 @@ final class CAS_Sidebar_Edit extends CAS_Admin
1024
  }
1025
  $visibility[] = $data;
1026
  }
 
 
 
 
 
 
1027
 
1028
  if (!cas_fs()->can_use_premium_code()) {
1029
  $visibility[] = array(
@@ -1038,6 +1046,7 @@ final class CAS_Sidebar_Edit extends CAS_Admin
1038
  wp_localize_script('cas/admin/edit', 'CASAdmin', array(
1039
  'allVisibility' => __('All Users', 'content-aware-sidebars'),
1040
  'visibility' => $visibility,
 
1041
  'weekdays' => array(
1042
  'shorthand' => array_values($wp_locale->weekday_abbrev),
1043
  'longhand' => array_values($wp_locale->weekday)
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
1000
  $this->enqueue_style('flatpickr', 'flatpickr.dark.min', array(), '3.0.6');
1001
  wp_enqueue_style('wp-color-picker');
1002
 
1003
+ $metadata = CAS_App::instance()->_manager->metadata();
1004
  $visibility = array();
1005
+ $target = array();
1006
+ foreach ($metadata->get('visibility')->get_input_list() as $category_key => $category) {
1007
 
1008
  //legacy format
1009
  if (!is_array($category)) {
1026
  }
1027
  $visibility[] = $data;
1028
  }
1029
+ foreach ($metadata->get('host')->get_input_list() as $value => $label) {
1030
+ $target[] = array(
1031
+ 'id' => $value,
1032
+ 'text' => $label
1033
+ );
1034
+ }
1035
 
1036
  if (!cas_fs()->can_use_premium_code()) {
1037
  $visibility[] = array(
1046
  wp_localize_script('cas/admin/edit', 'CASAdmin', array(
1047
  'allVisibility' => __('All Users', 'content-aware-sidebars'),
1048
  'visibility' => $visibility,
1049
+ 'target' => $target,
1050
  'weekdays' => array(
1051
  'shorthand' => array_values($wp_locale->weekday_abbrev),
1052
  'longhand' => array_values($wp_locale->weekday)
admin/sidebar-list-table.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
@@ -465,8 +465,20 @@ class CAS_Sidebar_List_Table extends WP_List_Table
465
  case 1:
466
  case 3:
467
  $return = $action->get_list_data($post->ID);
468
- $host = $metadata->get('host')->get_list_data($post->ID);
469
- $return .= ': ' . ($host ? $host : '<span style="color:red;">' . __('Target not found', 'content-aware-sidebars') . '</span>');
 
 
 
 
 
 
 
 
 
 
 
 
470
  if ($action->get_data($post->ID) == 1) {
471
  $pos = $metadata->get('merge_pos')->get_data($post->ID, true);
472
  $pos_icon = $pos ? 'up' : 'down';
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
465
  case 1:
466
  case 3:
467
  $return = $action->get_list_data($post->ID);
468
+ $hosts = $metadata->get('host')->get_data($post->ID, false, false);
469
+ if ($hosts) {
470
+ $list = $metadata->get('host')->get_input_list();
471
+ $data = [];
472
+ foreach ($hosts as $host) {
473
+ if (!isset($list[$host])) {
474
+ $data[] = '<span style="color:red;">' . __('Target not found', 'content-aware-sidebars') . '</span>';
475
+ } else {
476
+ $data[] = $list[$host];
477
+ }
478
+ }
479
+ $return .= ':<br> ' . implode(', ', $data);
480
+ }
481
+
482
  if ($action->get_data($post->ID) == 1) {
483
  $pos = $metadata->get('merge_pos')->get_data($post->ID, true);
484
  $pos_icon = $pos ? 'up' : 'down';
admin/sidebar-overview.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
app.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
@@ -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.13.1';
15
 
16
  /**
17
  * Prefix for sidebar id
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
11
  final class CAS_App
12
  {
13
  const PLUGIN_VERSION_KEY = 'cas_db_version';
14
+ const PLUGIN_VERSION = '3.14';
15
 
16
  /**
17
  * Prefix for sidebar id
assets/css/style.css CHANGED
@@ -3,4 +3,4 @@
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
  * @copyright 2020 by Joachim Jensen
6
- */#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#submitdiv .cas-save{background:#f5f5f5;border-bottom:1px solid #ddd;overflow:hidden;padding:7px 10px}#submitdiv .cas-overview-actions{padding:0 10px}#submitdiv .cas-overview-actions .dashicons{color:#82878c}#submitdiv .cas-overview-actions>li{margin:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.button.button-cas-delete{color:#fff;text-decoration:none;background-color:#a00;border:1px solid #000}.button.button-cas-delete:hover{color:#fff;background-color:red}a.cas-delete{color:#a00;text-decoration:none}a.cas-delete:hover{color:red}.cas-schedule-slide.ui-slider{position:relative;margin:12px;border-radius:4px;background:#c5c5c5;color:#333}.cas-schedule-slide.ui-slider .ui-slider-handle{position:absolute;z-index:2;height:24px;width:24px;touch-action:none;text-align:center;border-radius:12px;transition:background .2s}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-default{border:1px solid #c5c5c5;background:#fff;box-shadow:0 0 0 9px #fff inset,0 1px 2px rgba(0,0,0,.15)}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-active{background:#7ad03a;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.cas-schedule-slide.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background:#7ad03a}.cas-schedule-slide.ui-slider.ui-state-disabled{opacity:.35;cursor:default!important;pointer-events:none}.cas-schedule-slide.ui-slider.ui-slider-horizontal{height:4px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-handle{margin-left:-12px;top:-12px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-max{right:0}.button.button-cas-upgrade{background:#dd1d0c;color:#fff;border-color:#ac170a;font-weight:700;box-shadow:0 0 0 1px rgba(255,255,255,.3) inset,0 1px 0 #ac170a}.button.button-cas-upgrade:hover{color:#fff;border-color:#ac170a;background:#eb5c50}.button.button-cas-upgrade:active,.button.button-cas-upgrade:focus{color:#fff;background:#dd1d0c;border-color:#ac170a;box-shadow:inset 0 2px 0 #ac170a;vertical-align:top}#cas-plugin-links.postbox{background-color:#ddecf4;border-color:#9fcadf;box-shadow:0 0 0 1px #fff inset,0 1px 1px rgba(0,0,0,.04)}#cas-plugin-links .postbox-header{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}#cas-plugin-links .handle-actions{display:none!important}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-handler{width:25%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.sidebar-status .sidebar-status-label{display:block;overflow:hidden;cursor:pointer;height:16px;padding:0;line-height:16px;border-radius:16px;background-color:#dc3232;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}.sidebar-status .sidebar-status-label:before{content:"";display:block;width:12px;height:12px;margin:0;background:#fff;position:absolute;top:2px;bottom:0;right:14px;border-radius:16px;transition:right .2s ease-in;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.widget-liquid-right .widgets-holder-wrap .cas-settings{border-top:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;background-color:#f7f7f7;margin-left:-8px;margin-right:-8px;margin-bottom:10px;overflow:hidden}.widget-liquid-right .widgets-holder-wrap .sidebar-status{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar]{box-shadow:inset 0 4px 0 #75d7ef}.cas-form-table{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.cas-schedule-days{text-transform:uppercase;overflow:hidden;display:inline-block;border:1px solid #dfdfdf;margin:0;border-radius:3px}.cas-schedule-days li{float:left;margin:0}.cas-schedule-days input{display:none}.cas-schedule-days label{transition:background .2s;background:#0085ba;display:block;padding:8px 12px;color:#fff}.cas-schedule-days label:hover{background:#007aab}.cas-schedule-days input:checked+label{color:inherit;background:#f1f1f1}.cas-schedule-days input:checked+label:hover{background:#e9e9e9}.cas-filter-sidebar{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
  * @copyright 2020 by Joachim Jensen
6
+ */#cas-rules .cas-heart{color:#ac170a}body.js .js-cas-visibility{max-height:30px;overflow:hidden}.cas-section,.js-cas-action{display:none}.nav-tab-wrapper.js-cas-tabs .nav-tab{position:relative}.nav-tab-active:focus{box-shadow:none}.cas-input-inline{display:inline-block}.cas-input-sm{max-width:80px;font-size:.8em;vertical-align:middle}.cas-metabox-holder .hndle{cursor:auto!important}#submitdiv .handlediv,#submitdiv .hndle,#submitdiv .postbox-header,.cas-metabox-holder .handle-actions,.cas-metabox-holder .handlediv{display:none!important}#submitdiv .cas-save{background:#f5f5f5;border-bottom:1px solid #ddd;overflow:hidden;padding:7px 10px}#submitdiv .cas-overview-actions{padding:0 10px}#submitdiv .cas-overview-actions .dashicons{color:#82878c}#submitdiv .cas-overview-actions>li{margin:0}#submitdiv .cas-overview-actions>li:not(:last-of-type){padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #eee}.cas-pro-label{font-size:.8em;background-color:#31c455;border-radius:5px;color:#fff;padding:2px 6px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}.button.button-cas-delete{color:#fff;text-decoration:none;background-color:#a00;border:1px solid #000}.button.button-cas-delete:hover{color:#fff;background-color:red}a.cas-delete{color:#a00;text-decoration:none}a.cas-delete:hover{color:red}.cas-schedule-slide.ui-slider{position:relative;margin:12px;border-radius:4px;background:#c5c5c5;color:#333}.cas-schedule-slide.ui-slider .ui-slider-handle{position:absolute;z-index:2;height:24px;width:24px;touch-action:none;text-align:center;border-radius:12px;transition:background .2s}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-default{border:1px solid #c5c5c5;background:#fff;box-shadow:0 0 0 9px #fff inset,0 1px 2px rgba(0,0,0,.15)}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-active{background:#7ad03a;border-color:#999}.cas-schedule-slide.ui-slider .ui-slider-handle.ui-state-focus:focus{outline:0}.cas-schedule-slide.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background:#7ad03a}.cas-schedule-slide.ui-slider.ui-state-disabled{opacity:.35;cursor:default!important;pointer-events:none}.cas-schedule-slide.ui-slider.ui-slider-horizontal{height:4px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-handle{margin-left:-12px;top:-12px}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-min{left:0}.cas-schedule-slide.ui-slider.ui-slider-horizontal .ui-slider-range-max{right:0}.button.button-cas-upgrade{background:#dd1d0c;color:#fff;border-color:#ac170a;font-weight:700;box-shadow:0 0 0 1px rgba(255,255,255,.3) inset,0 1px 0 #ac170a}.button.button-cas-upgrade:hover{color:#fff;border-color:#ac170a;background:#eb5c50}.button.button-cas-upgrade:active,.button.button-cas-upgrade:focus{color:#fff;background:#dd1d0c;border-color:#ac170a;box-shadow:inset 0 2px 0 #ac170a;vertical-align:top}#cas-plugin-links.postbox{background-color:#ddecf4;border-color:#9fcadf;box-shadow:0 0 0 1px #fff inset,0 1px 1px rgba(0,0,0,.04)}#cas-plugin-links .postbox-header{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}#cas-plugin-links .handle-actions{display:none!important}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-handler,.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-status,.wp-list-table.fixed .column-widgets{width:80px}.wp-list-table.fixed .column-status .dashicons{color:#999}.wp-list-table.fixed .column-status .sidebar-status{display:inline-block;margin-right:6px}.sidebar-status{margin:2px 0 0;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.sidebar-status .sidebar-status-input{display:none}.sidebar-status .sidebar-status-label{display:block;overflow:hidden;cursor:pointer;height:16px;padding:0;line-height:16px;border-radius:16px;background-color:#dc3232;box-shadow:0 0 2px rgba(0,0,0,.2) inset;transition:background-color .2s ease-in}.sidebar-status .sidebar-status-label:before{content:"";display:block;width:12px;height:12px;margin:0;background:#fff;position:absolute;top:2px;bottom:0;right:14px;border-radius:16px;transition:right .2s ease-in;box-shadow:0 1px 2px rgba(0,0,0,.2)}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.widget-liquid-right .widgets-holder-wrap .sidebar-name h2,.widget-liquid-right .widgets-holder-wrap .sidebar-name h3{text-overflow:ellipsis}.widget-liquid-right .widgets-holder-wrap .cas-settings{border-top:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;background-color:#f7f7f7;margin-left:-8px;margin-right:-8px;margin-bottom:10px;overflow:hidden}.widget-liquid-right .widgets-holder-wrap .sidebar-status{float:right;margin:10px 10px 0}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link{display:inline-block;border-right:1px solid #dfdfdf;padding:8px 10px;color:#888;text-decoration:none;transition:.4s;box-shadow:none}.widget-liquid-right .widgets-holder-wrap .cas-sidebar-link:hover{background-color:#fff;color:#222}.widget-liquid-right .widgets-holder-wrap.closed .cas-settings{display:none}.widget-liquid-right .widgets-holder-wrap div[id^=ca-sidebar]{box-shadow:inset 0 4px 0 #75d7ef}.cas-form-table{width:97%;margin:0 auto}.cas-form-table tr td:first-child{min-width:30%}.cas-form-table tr td{border-bottom:1px solid #eee}.cas-schedule-days{text-transform:uppercase;overflow:hidden;display:inline-block;border:1px solid #dfdfdf;margin:0;border-radius:3px}.cas-schedule-days li{float:left;margin:0}.cas-schedule-days input{display:none}.cas-schedule-days label{transition:background .2s;background:#0085ba;display:block;padding:8px 12px;color:#fff}.cas-schedule-days label:hover{background:#007aab}.cas-schedule-days input:checked+label{color:inherit;background:#f1f1f1}.cas-schedule-days input:checked+label:hover{background:#e9e9e9}.cas-filter-sidebar{max-width:calc(900px + 2%);margin:10px 0;vertical-align:middle}.cas-filter-sidebar .sidebars-toggle{margin:16px 0 0 10px;display:inline-block}.cas-filter-sidebar .sidebars-toggle a{outline:0;box-shadow:none}.cas-filter-sidebar .button{margin:10px 0}.cas-filter-sidebar input{float:right}input.cas-filter{margin:10px 0}.wp-header-end{visibility:visible;margin:14px -20px 0;clear:both}@media (min-width:783px){.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .widget-liquid-left{position:absolute;top:50px}.cas-widget-manager:not(.widgets_access) .wrap .error,.cas-widget-manager:not(.widgets_access) .wrap .notice,.cas-widget-manager:not(.widgets_access) .wrap .postbox,.cas-widget-manager:not(.widgets_access) .wrap .updated,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) .update-nag{margin-left:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 4px 0 rgba(0,0,0,.1);width:32%;border-color:#dfdfdf;border-style:solid;border-width:0 1px 1px 0;left:160px}.cas-widget-manager:not(.widgets_access) #available-widgets input.cas-filter{width:100%}.cas-widget-manager:not(.widgets_access) #available-widgets .widget{padding-bottom:10px}.cas-widget-manager:not(.widgets_access) #available-widgets #widget-list{border-top:1px solid #dfdfdf;padding:3px;margin:0 -10px;background:#fff}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed){min-height:600px;bottom:0;border-bottom-width:0}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name{position:static}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{display:block;bottom:auto;right:10px}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .sidebar-name .toggle-indicator{display:block}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #removing-widget{box-sizing:border-box;padding:10px 0 0;color:#c00;z-index:2;text-align:center;position:absolute;background-color:rgba(255,255,255,.6);border:4px dashed #c00;top:0;left:0;right:0;height:100%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) .description{display:none}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{position:fixed;top:120px;padding:12px 10px;overflow-y:auto;overflow-x:hidden;width:calc(32% - 1px);bottom:0}.cas-widget-manager:not(.widgets_access).folded #available-widgets{left:36px;width:37.5%}.cas-widget-manager:not(.widgets_access).folded #available-widgets:not(.closed) #widget-list{width:calc(37.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl .wrap .error,.cas-widget-manager:not(.widgets_access).rtl .wrap .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap .postbox,.cas-widget-manager:not(.widgets_access).rtl .wrap .update-nag,.cas-widget-manager:not(.widgets_access).rtl .wrap .updated,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.cas-widget-manager:not(.widgets_access).rtl .update-nag{margin-right:calc(38% + 50px)}.cas-widget-manager:not(.widgets_access).rtl #available-widgets{box-shadow:0 0 5px 0 rgba(0,0,0,.1);right:160px;left:auto;border-width:0 0 1px 1px}.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .handlediv,.cas-widget-manager:not(.widgets_access).rtl #available-widgets:not(.closed) .sidebar-name .sidebar-name-arrow{left:10px;right:auto}.cas-widget-manager:not(.widgets_access).rtl.folded #available-widgets{left:auto;right:36px}.cas-widget-manager:not(.widgets_access) #widgets-right .widgets-sortables{z-index:2}.cas-widget-manager div.widget-liquid-right{padding:0;margin:0;width:58%;float:right}.cas-widget-manager div.widget-liquid-left{width:38%;margin:0;float:left;padding:0}.cas-widget-manager .fw-ext-sidebars-wrap-container{float:right}}@media (min-width:783px) and (max-width:960px){.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets{left:36px;width:36%}.cas-widget-manager.auto-fold:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(36% - 1px)}.cas-widget-manager.auto-fold:not(.widgets_access).rtl #available-widgets{left:auto;right:36px}}@media (max-width:782px){input.cas-filter{width:100%}}@media (max-width:1249px){div#widgets-right .sidebars-column-1,div#widgets-right .sidebars-column-2{max-width:inherit}}@media (min-width:1250px){.cas-widget-manager:not(.widgets_access) #widgets-left #available-widgets .widget:nth-child(even){float:left;margin:0 0 0 2%}.cas-widget-manager:not(.widgets_access) #available-widgets{width:34.5%}.cas-widget-manager:not(.widgets_access) #available-widgets:not(.closed) #widget-list{width:calc(34.5% - 1px)}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget{float:right;padding-left:2%}.cas-widget-manager:not(.widgets_access).rtl #widgets-left #available-widgets .widget:nth-child(odd){margin-right:-2%}}
assets/js/cas_admin.min.js CHANGED
@@ -2,6 +2,6 @@
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
- * @copyright 2019 by Joachim Jensen
6
  */
7
- !function($){"use strict";var e={current_section:0,sections:[],init:function(){this.tabController(),this.actionOptionHandler(),this.suggestVisibility(),this.initSidebarActivation(),$(".js-cas-color-field").wpColorPicker(),$(".js-cas-html").on("change",function(t){var e=$(this);$(e.data("target")).attr("disabled",!e.is(":checked"))}).trigger("change")},initSidebarActivation:function(){flatpickr.l10ns.default.weekdays=CASAdmin.weekdays,flatpickr.l10ns.default.months=CASAdmin.months,flatpickr.l10ns.default.firstDayOfWeek=CASAdmin.weekStart;var t=-1===CASAdmin.timeFormat.toLowerCase().indexOf("a"),i=flatpickr(".js-cas-activation",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||s.config.minDate)&&s.set("minDate",e?new Date(t):null),e?a.prop("checked",!1):a.is(":checked")||s.clear()}}),s=flatpickr(".js-cas-expiry",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||i.config.maxDate)&&i.set("maxDate",e?new Date(t):null)}}),a=$(".js-cas-status");a.on("change",function(t){$(this).is(":checked")?i.clear():i.selectedDates.length||s.clear()})},initTabSections:function(){$(".js-cas-tabs").find(".nav-tab").each(function(){var t=this.href.lastIndexOf("#");0<=t&&(t=this.href.substr(t),e.sections.push(t),$(t).hide())})},tabController:function(){this.initTabSections(),this.setCurrentSection(window.location.hash),$("#poststuff").on("click",".js-nav-link",function(t){e.setCurrentSection(this.href)})},findSectionByURL:function(t){t=this.sections.indexOf(t.substring(t.lastIndexOf("#")));return 0<=t?t:null},setCurrentSection:function(t){var e=this.findSectionByURL(t)||0,t=$(".js-cas-tabs").find(".nav-tab");t.eq(e).is(":visible")&&($(this.sections[this.current_section]).hide(),t.eq(this.current_section).removeClass("nav-tab-active"),this.current_section=e,$(this.sections[this.current_section]).show(),t.eq(this.current_section).addClass("nav-tab-active"),$("#_cas_section").val("#top"+this.sections[this.current_section]))},actionOptionHandler:function(){var t=$("#cas-options"),e=t.find(".js-cas-action");t.on("change",".js-cas-handle",function(){var t=$(this),t=e.filter(".js-cas-action-"+t.val());e.not(t).hide().find("input,select").attr("disabled",!0),t.fadeIn("fast").find("input,select").attr("disabled",!1)}),t.find(".js-cas-handle").trigger("change")},suggestVisibility:function(){var e=$(".js-cas-visibility");e.select2({theme:"wpca",placeholder:CASAdmin.allVisibility,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,nextSearchTerm:function(t,e){return e},data:CASAdmin.visibility}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")}};$(document).ready(function(){e.init()})}(jQuery);
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
+ * @copyright 2020 by Joachim Jensen
6
  */
7
+ !function($){"use strict";var e={current_section:0,sections:[],init:function(){this.tabController(),this.actionOptionHandler(),this.suggestVisibility(),this.suggestTarget(),this.initSidebarActivation(),$(".js-cas-color-field").wpColorPicker(),$(".js-cas-html").on("change",function(t){var e=$(this);$(e.data("target")).attr("disabled",!e.is(":checked"))}).trigger("change")},initSidebarActivation:function(){flatpickr.l10ns.default.weekdays=CASAdmin.weekdays,flatpickr.l10ns.default.months=CASAdmin.months,flatpickr.l10ns.default.firstDayOfWeek=CASAdmin.weekStart;var t=-1===CASAdmin.timeFormat.toLowerCase().indexOf("a"),i=flatpickr(".js-cas-activation",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||a.config.minDate)&&a.set("minDate",e?new Date(t):null),e?s.prop("checked",!1):s.is(":checked")||a.clear()}}),a=flatpickr(".js-cas-expiry",{wrap:!0,clickOpens:!0,enableTime:!0,time_24hr:t,allowInput:!0,enableSeconds:!0,onChange:function(t,e,n){(e||i.config.maxDate)&&i.set("maxDate",e?new Date(t):null)}}),s=$(".js-cas-status");s.on("change",function(t){$(this).is(":checked")?i.clear():i.selectedDates.length||a.clear()})},initTabSections:function(){$(".js-cas-tabs").find(".nav-tab").each(function(){var t=this.href.lastIndexOf("#");0<=t&&(t=this.href.substr(t),e.sections.push(t),$(t).hide())})},tabController:function(){this.initTabSections(),this.setCurrentSection(window.location.hash),$("#poststuff").on("click",".js-nav-link",function(t){e.setCurrentSection(this.href)})},findSectionByURL:function(t){t=this.sections.indexOf(t.substring(t.lastIndexOf("#")));return 0<=t?t:null},setCurrentSection:function(t){var e=this.findSectionByURL(t)||0,t=$(".js-cas-tabs").find(".nav-tab");t.eq(e).is(":visible")&&($(this.sections[this.current_section]).hide(),t.eq(this.current_section).removeClass("nav-tab-active"),this.current_section=e,$(this.sections[this.current_section]).show(),t.eq(this.current_section).addClass("nav-tab-active"),$("#_cas_section").val("#top"+this.sections[this.current_section]))},actionOptionHandler:function(){var t=$("#cas-options"),e=t.find(".js-cas-action");t.on("change",".js-cas-handle",function(){var t=$(this),t=e.filter(".js-cas-action-"+t.val());e.not(t).hide().find("input,select").attr("disabled",!0),t.fadeIn("fast").find("input,select").attr("disabled",!1)}),t.find(".js-cas-handle").trigger("change")},suggestVisibility:function(){var e=$(".js-cas-visibility");e.select2({theme:"wpca",placeholder:CASAdmin.allVisibility,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,nextSearchTerm:function(t,e){return e},data:CASAdmin.visibility}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")},suggestTarget:function(){var e=$(".js-cas-host");e.select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"250px",nextSearchTerm:function(t,e){return e},data:CASAdmin.target}).on("select2:selecting",function(t){e.data("forceOpen",!0)}).on("select2:close",function(t){e.data("forceOpen")&&(t.preventDefault(),e.select2("open"),e.data("forceOpen",!1))}),e.data("value")&&e.val(e.data("value").toString().split(",")).trigger("change")}};$(document).ready(function(){e.init()})}(jQuery);
assets/js/general.min.js CHANGED
@@ -2,6 +2,6 @@
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
- * @copyright 2019 by Joachim Jensen
6
  */
7
  !function($){"use strict";var t={init:function(){this.toggleSidebarStatus(),CAS.showPopups&&(this.upgradeNoticeHandler(),this.reviewNoticeHandler())},toggleSidebarStatus:function(){$(".sidebar-status").on("change","input.sidebar-status-input",function(t){var a=$(this),e=a.is(":checked");if(a.hasClass("sidebar-status-future")&&!confirm(CAS.enableConfirm))return a.attr("checked",!e),t.preventDefault(),!1;$.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:a.val(),token:a.attr("data-nonce"),status:e},function(t){t.success?(a.next().attr("title",t.data.title),a.removeClass("sidebar-status-future")):(alert(t.data),a.attr("checked",!e))})})},upgradeNoticeHandler:function(){$(".js-cas-pro-notice.button").attr("disabled",!0),$(".js-cas-pro-notice").on("click",function(t){t.preventDefault(),$(".js-cas-pro-read-more").attr("href",$(this).data("url")),$(".js-cas-pro-popup").trigger("click")})},reviewNoticeHandler:function(){var e=$(".js-cas-notice-review");e.on("click","a, button",function(t){var a=$(this);$.ajax({url:ajaxurl,data:{action:"cas_dismiss_review_notice",dismiss:a.data("cas-rating")?1:0},dataType:"JSON",type:"POST",success:function(t){e.fadeOut(400,function(){e.remove()})},error:function(t,a,e){}})})}};$(document).ready(function(){t.init()})}(jQuery);
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
+ * @copyright 2020 by Joachim Jensen
6
  */
7
  !function($){"use strict";var t={init:function(){this.toggleSidebarStatus(),CAS.showPopups&&(this.upgradeNoticeHandler(),this.reviewNoticeHandler())},toggleSidebarStatus:function(){$(".sidebar-status").on("change","input.sidebar-status-input",function(t){var a=$(this),e=a.is(":checked");if(a.hasClass("sidebar-status-future")&&!confirm(CAS.enableConfirm))return a.attr("checked",!e),t.preventDefault(),!1;$.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:a.val(),token:a.attr("data-nonce"),status:e},function(t){t.success?(a.next().attr("title",t.data.title),a.removeClass("sidebar-status-future")):(alert(t.data),a.attr("checked",!e))})})},upgradeNoticeHandler:function(){$(".js-cas-pro-notice.button").attr("disabled",!0),$(".js-cas-pro-notice").on("click",function(t){t.preventDefault(),$(".js-cas-pro-read-more").attr("href",$(this).data("url")),$(".js-cas-pro-popup").trigger("click")})},reviewNoticeHandler:function(){var e=$(".js-cas-notice-review");e.on("click","a, button",function(t){var a=$(this);$.ajax({url:ajaxurl,data:{action:"cas_dismiss_review_notice",dismiss:a.data("cas-rating")?1:0},dataType:"JSON",type:"POST",success:function(t){e.fadeOut(400,function(){e.remove()})},error:function(t,a,e){}})})}};$(document).ready(function(){t.init()})}(jQuery);
assets/js/suggest-sidebars.min.js CHANGED
@@ -2,6 +2,6 @@
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
- * @copyright 2019 by Joachim Jensen
6
  */
7
  !function($){"use strict";var e={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){$(".js-cas-more").click(function(e){e.preventDefault();var t=$(this),e=$(t.data("toggle")),t=t.children(":first");t.hasClass("dashicons-arrow-down-alt2")?(t.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),e.slideDown()):(t.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),e.slideUp())})},suggestSidebars:function(){$(".js-cas-sidebars").each(function(){$(this).select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"100%",escapeMarkup:function(e){return e},createTag:function(e){e=$.trim(e.term);return""===e?null:{id:"_"+e.replace(/,/g,"__"),text:e,new:!0}},templateSelection:function(e){return(e.new?"<b>("+CAS.labelNew+")</b> ":"")+e.text},templateResult:function(e){return(e.new?"<b>"+CAS.createNew+":</b> ":"")+e.text},templateNoMatches:function(e){return CAS.notFound}})})}};$(document).ready(function(){e.init()})}(jQuery);
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
+ * @copyright 2020 by Joachim Jensen
6
  */
7
  !function($){"use strict";var e={init:function(){this.suggestSidebars(),this.toggleSidebarInputs()},toggleSidebarInputs:function(){$(".js-cas-more").click(function(e){e.preventDefault();var t=$(this),e=$(t.data("toggle")),t=t.children(":first");t.hasClass("dashicons-arrow-down-alt2")?(t.addClass("dashicons-arrow-up-alt2").removeClass("dashicons-arrow-down-alt2"),e.slideDown()):(t.addClass("dashicons-arrow-down-alt2").removeClass("dashicons-arrow-up-alt2"),e.slideUp())})},suggestSidebars:function(){$(".js-cas-sidebars").each(function(){$(this).select2({theme:"wpca",minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"100%",escapeMarkup:function(e){return e},createTag:function(e){e=$.trim(e.term);return""===e?null:{id:"_"+e.replace(/,/g,"__"),text:e,new:!0}},templateSelection:function(e){return(e.new?"<b>("+CAS.labelNew+")</b> ":"")+e.text},templateResult:function(e){return(e.new?"<b>"+CAS.createNew+":</b> ":"")+e.text},templateNoMatches:function(e){return CAS.notFound}})})}};$(document).ready(function(){e.init()})}(jQuery);
assets/js/widgets.min.js CHANGED
@@ -2,6 +2,6 @@
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
- * @copyright 2019 by Joachim Jensen
6
  */
7
  !function($){"use strict";var e={$sidebarContainer:$(".widget-liquid-right"),$widgetContainer:$("#available-widgets"),init:function(){this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.enhancedWidgetManager()},openSidebarByURL:function(){var e,i;!window.location.hash||(i=(e=this.$sidebarContainer.find(".widgets-holder-wrap")).has(window.location.hash)).length&&i.add(e.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")},enhancedWidgetManager:function(){var i,a;$("body").hasClass("cas-widget-manager")&&(this.$widgetContainer.find(".widget").draggable("option","scroll",!1),i=this,(a=$("#widgets-left .inactive-sidebar")).toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(e){a.toggle(i.$widgetContainer.hasClass("closed"))}))},addWidgetSearch:function(){var e=$(".widget",this.$widgetContainer).get().reverse();$(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(e)},searchWidgetListener:function(i){var t,s="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var a=$(this).val();a!=s&&(s=a,t&&clearTimeout(t),t=setTimeout(function(){$(i).each(function(e,i){i=$(i);i.find(".widget-title :nth-child(1)").text().search(new RegExp(a,"i"))<0?i.fadeOut():(i.prependTo(i.parent()),i.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var e='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><div class="sidebars-toggle"><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div><input type="search" class="js-cas-filter cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."></div>';this.$sidebarContainer.prepend(e),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var i=$(document),a=this.$sidebarContainer.find(".widgets-holder-wrap");$("body").on("click",".js-sidebars-toggle",function(e){e.preventDefault();e=!!$(this).data("toggle");a.toggleClass("closed",!e),e&&a.children(".widgets-sortables").sortable("refresh"),i.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var i,t=this,s="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var a=$(this).val();a!=s&&(s=a,i&&clearTimeout(i),i=setTimeout(function(){$(".widgets-holder-wrap",t.$sidebarContainer).each(function(e,i){i=$(i);i.find(".sidebar-name :nth-child(2)").text().search(new RegExp(a,"i"))<0?i.fadeOut():i.fadeIn()})},250))})}};$(document).ready(function(){e.init()})}(jQuery);
2
  * @package Content Aware Sidebars
3
  * @author Joachim Jensen <joachim@dev.institute>
4
  * @license GPLv3
5
+ * @copyright 2020 by Joachim Jensen
6
  */
7
  !function($){"use strict";var e={$sidebarContainer:$(".widget-liquid-right"),$widgetContainer:$("#available-widgets"),init:function(){this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.enhancedWidgetManager()},openSidebarByURL:function(){var e,i;!window.location.hash||(i=(e=this.$sidebarContainer.find(".widgets-holder-wrap")).has(window.location.hash)).length&&i.add(e.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")},enhancedWidgetManager:function(){var i,a;$("body").hasClass("cas-widget-manager")&&(this.$widgetContainer.find(".widget").draggable("option","scroll",!1),i=this,(a=$("#widgets-left .inactive-sidebar")).toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(e){a.toggle(i.$widgetContainer.hasClass("closed"))}))},addWidgetSearch:function(){var e=$(".widget",this.$widgetContainer).get().reverse();$(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(e)},searchWidgetListener:function(i){var t,s="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var a=$(this).val();a!=s&&(s=a,t&&clearTimeout(t),t=setTimeout(function(){$(i).each(function(e,i){i=$(i);i.find(".widget-title :nth-child(1)").text().search(new RegExp(a,"i"))<0?i.fadeOut():(i.prependTo(i.parent()),i.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var e='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><div class="sidebars-toggle"><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div><input type="search" class="js-cas-filter cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."></div>';this.$sidebarContainer.prepend(e),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var i=$(document),a=this.$sidebarContainer.find(".widgets-holder-wrap");$("body").on("click",".js-sidebars-toggle",function(e){e.preventDefault();e=!!$(this).data("toggle");a.toggleClass("closed",!e),e&&a.children(".widgets-sortables").sortable("refresh"),i.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var i,t=this,s="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var a=$(this).val();a!=s&&(s=a,i&&clearTimeout(i),i=setTimeout(function(){$(".widgets-holder-wrap",t.$sidebarContainer).each(function(e,i){i=$(i);i.find(".sidebar-name :nth-child(2)").text().search(new RegExp(a,"i"))<0?i.fadeOut():i.fadeIn()})},250))})}};$(document).ready(function(){e.init()})}(jQuery);
cas_uninstall.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
conditions/placeholder.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
content-aware-sidebars.php CHANGED
@@ -3,16 +3,16 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
  /*
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.13.1
13
  Author: Joachim Jensen - DEV Institute
14
  Author URI: https://dev.institute
15
- Requires at least: 4.8
16
  Requires PHP: 5.6
17
  Text Domain: content-aware-sidebars
18
  Domain Path: /lang/
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
  /*
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.14
13
  Author: Joachim Jensen - DEV Institute
14
  Author URI: https://dev.institute
15
+ Requires at least: 4.9
16
  Requires PHP: 5.6
17
  Text Domain: content-aware-sidebars
18
  Domain Path: /lang/
freemius.php CHANGED
@@ -4,7 +4,7 @@
4
  * @package Content Aware Sidebars
5
  * @author Joachim Jensen <joachim@dev.institute>
6
  * @license GPLv3
7
- * @copyright 2019 by Joachim Jensen
8
  */
9
  defined( 'ABSPATH' ) || exit;
10
  // Create a helper function for easy SDK access.
4
  * @package Content Aware Sidebars
5
  * @author Joachim Jensen <joachim@dev.institute>
6
  * @license GPLv3
7
+ * @copyright 2020 by Joachim Jensen
8
  */
9
  defined( 'ABSPATH' ) || exit;
10
  // Create a helper function for easy SDK access.
lib/wp-content-aware-engine/assets/js/condition_groups.min.js CHANGED
@@ -1,7 +1,7 @@
1
- /*!
2
- * @package WP Content Aware Engine
3
- * @author Joachim Jensen <joachim@dev.institute>
4
- * @license GPLv3
5
- * @copyright 2020 by Joachim Jensen
6
- */
7
  var CAE=CAE||{};!function($,CAE){"use strict";CAE.settings={views:{}},CAE.Models={},CAE.Models.Alert=Backbone.Model.extend({defaults:{text:"",success:!0},sync:function(){return!1},url:"",reset:function(){this.set(this.defaults)}}),CAE.Models.Condition=Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:{module:null,label:"",placeholder:"",values:[],default_value:null},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this)},sync:function(){return!1},url:""}),CAE.Models.Group=Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:function(){var e=WPCA.meta_default;return e.id=null,e.status="wpca_or",e.exposure=1,e},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this),this.conditions||(this.conditions=new CAE.Models.ConditionCollection)},parse:function(e){var t=[];if(_.has(e,"conditions")){for(var n in e.conditions)if(e.conditions.hasOwnProperty(n)){var i=[],o=e.conditions[n];for(var s in o.data)o.data.hasOwnProperty(s)&&i.push({text:"object"==typeof o.data[s]?o.data[s].text:o.data[s],id:s});delete o.data,o.module=n,o.values=i,t.push(o)}delete e.conditions}return this.conditions=new CAE.Models.ConditionCollection(t),e},sync:function(){return!1},url:""}),CAE.Models.GroupCollection=Backbone.Collection.extend({model:CAE.Models.Group,parse:function(e){return e}}),CAE.Models.ConditionCollection=Backbone.Collection.extend({model:CAE.Models.Condition}),CAE.Views={},CAE.Views.Alert=Backbone.Epoxy.View.extend({bindings:"data-vm",tagName:"div",className:"wpca-alert",template:"<div data-vm=\"classes:{'wpca-success':success,'wpca-error':not(success)},text:text\"></div>",timer:4e3,success:function(e){this.model.set({text:e,success:!0})},failure:function(e){this.model.set({text:e,success:!1})},dismiss:function(){var e=this;this.$el.fadeOut("slow",function(){e.model.reset()})},initialize:function(){this.listenTo(this.model,"change:text",this.show),this.$el.appendTo("body").hide().html(this.template)},show:function(){if(""!==this.model.get("text")){this.$el.fadeIn("slow");var e=this;setTimeout(function(){e.dismiss()},this.timer)}}}),CAE.Views.Condition=Backbone.Epoxy.View.extend({bindings:"data-vm",model:CAE.Models.Condition,tagName:"div",className:"cas-condition",templateName:"#wpca-template-condition",events:{"click .js-wpca-condition-remove":"removeModel"},initialize:function(){this.listenTo(this.model,"destroy",this.remove);var e=$(this.templateName);e.length?(this.template=e.html(),this.$el.append(this.template),this.createSuggestInput()):this.model.destroy()},removeModel:function(e){var t=this;this.$el.slideUp(300,function(){t.model.destroy()})},createSuggestInput:function(){var n=this.$el.find(".js-wpca-suggest");if(n.length){var i=this.model,e=this.model.get("values"),t=$("<div></div>").html(i.get("placeholder")).text();n.select2({cachedResults:{},quietMillis:400,searchTimer:null,type:i.get("module"),theme:"wpca",dir:WPCA.text_direction,placeholder:t,minimumInputLength:0,closeOnSelect:!0,width:"100%",language:{noResults:function(){return WPCA.noResults},searching:function(){return WPCA.searching+"..."},loadingMore:function(){return WPCA.loadingMore+"..."}},nextSearchTerm:function(e,t){return t},templateResult:function(e){return e.level?$('<span class="wpca-level-'+e.level+'">'+e.text+"</span>"):e.text},data:e,dataAdapter:l.wpcaDataAdapter,ajax:{}}).on("select2:selecting",function(e){n.data("forceOpen",!0)}).on("select2:closing",function(e){n.data("forceOpen")&&(e.preventDefault(),n.data("forceOpen",!1))}),e.length&&n.val(_.map(e,function(e){return e.id})).trigger("change"),n.on("change",function(e){var t=n.select2("data");i.set("values",t)})}}}),CAE.Views.Group=Backbone.Epoxy.View.extend({bindings:"data-vm",model:CAE.Models.Group,tagName:"li",className:"cas-group-single",template:$("#wpca-template-group").html(),itemView:function(e){if(CAE.Views[e.model.get("module")])var t=new(CAE.Views[e.model.get("module")])(e);else t=new CAE.Views.Condition(e);return t},events:{"click .js-wpca-save-group":"saveGroup","click .js-wpca-options":"showOptions"},computeds:{statusNegated:{deps:["status"],get:function(e){return"negated"==e},set:function(e){var t=e?"negated":"wpca_or";this.setBinding("status",t)}},statusExcept:{deps:["status"],get:function(e){return"wpca_except"==e},set:function(e){var t=e?"wpca_except":"wpca_or";this.setBinding("status",t)}},statusLabel:function(){switch(this.getBinding("status")){case"wpca_except":return WPCA.condition_except;case"negated":return WPCA.condition_not;default:return WPCA.condition_or}}},bindingFilters:{int:{get:function(e){return e?1:0},set:function(e){return e?1:0}},binary:{get:function(e){return e?1:0},set:function(e){return e?1:0}},hasModule:function(e){for(var t={},n=1;n<arguments.length;n++)t[arguments[n]]=!0;return e.filter(function(e){return t.hasOwnProperty(e.get("module"))}).length==arguments.length-1},hasAnyModule:function(e){for(var t={},n=1;n<arguments.length;n++)t[arguments[n]]=!0;return!!e.find(function(e){return t.hasOwnProperty(e.get("module"))})}},initialize:function(){this.collection=this.model.conditions,this.$el.hide().html(this.template).fadeIn(300),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"unsavedChanges",this.saveChanges),this.listenTo(this.model.conditions,"unsavedChanges",this.saveChanges),this.listenTo(this.model.conditions,"add remove",this.saveAddRemove);var i=this,o=$(".js-wpca-add-and",this.$el);o.select2({theme:"wpca",placeholder:"+ "+WPCA.newCondition,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"resolve",matcher:l.wpcaModuleMatcher,nextSearchTerm:function(e,t){return t},data:WPCA.conditions}).on("select2:select",function(e){var t=e.params.data;if(!i.model.conditions.findWhere({module:t.id})){var n=new CAE.Models.Condition({module:t.id,label:t.text,placeholder:t.placeholder,default_value:t.default_value});i.model.conditions.add(n)}o.val(null).trigger("change")})},showOptions:function(e){$(e.delegateTarget).find(".cas-group-options").slideToggle(200),$(e.currentTarget).toggleClass("active")},saveChanges:function(e,t){e&&i.start(this)},saveAddRemove:function(e,t,n){t.length?n.add?""!==e.get("default_value")&&i.start(this):this.model.get("id")&&i.start(this):(i.clear(this),this.model.get("id")?this.saveGroup():this.removeModel())},removeModel:function(){var e=this;this.$el.slideUp(400,function(){e.model.destroy()})},saveGroup:function(e){var i=this.$el.find(".spinner"),o=this.$el.find(".js-wpca-save-group"),t=this,n=_.clone(this.model.attributes);n.action="wpca/add-rule",n.token=l.nonce,n.current_id=l.sidebarID,n.post_type=WPCA.post_type,n.conditions={},this.model.conditions.each(function(e){e.get("values").length?n.conditions[e.get("module")]=e.get("values").map(function(e){return e.id}):""!==e.get("default_value")&&(n.conditions[e.get("module")]=[e.get("default_value")])}),o.attr("disabled",!0),i.addClass("is-active"),$.ajax({url:ajaxurl,data:n,dataType:"JSON",type:"POST",success:function(e){l.alert.success(e.message),e.removed?t.removeModel():e.new_post_id&&t.model.set("id",e.new_post_id,{silent:!0}),e.removed||(o.hide(),i.removeClass("is-active"),t.model.restartTracking(),t.model.conditions.each(function(e){e.restartTracking()}))},error:function(e,t,n){o.attr("disabled",!1).show(),i.removeClass("is-active"),l.alert.failure(e.responseJSON.data)}})},slideRemove:function(){this.$el.slideUp(400,function(){this.remove()})}}),CAE.Views.GroupCollection=Backbone.Epoxy.View.extend({bindings:"data-vm",el:"#cas-groups",collection:CAE.Models.GroupCollection,events:{"click .js-wpca-add-quick":"addGroupQuick","click .js-wpca-save":"saveAll"},conditionsById:{},initialize:function(){var o=this;this.conditionsById=_.chain(WPCA.conditions).pluck(["children"]).flatten().indexBy("id").value();var s=$(".js-wpca-add-or",this.$el);s.select2({theme:"wpca",placeholder:"+ "+WPCA.newGroup,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"auto",matcher:l.wpcaModuleMatcher,nextSearchTerm:function(e,t){return t},data:WPCA.conditions}).on("select2:select",function(e){var t=e.params.data,n=new CAE.Models.Group,i=new CAE.Models.Condition({module:t.id,label:t.text,placeholder:t.placeholder,default_value:t.default_value});o.collection.add(n),n.conditions.add(i),s.val(null).trigger("change")})},itemView:function(e){return new CAE.Views.Group(e)},addGroupQuick:function(e){e.preventDefault();var t=$(e.currentTarget).data("config"),n=new CAE.Models.Group;for(var i in n.set(t.options),this.collection.add(n),t.modules)if(this.conditionsById.hasOwnProperty(t.modules[i])){var o=this.conditionsById[t.modules[i]],s=new CAE.Models.Condition({module:o.id,label:o.text,placeholder:o.placeholder,default_value:o.default_value});n.conditions.add(s)}}}),$.fn.select2.amd.require(["select2/selection/search"],function(e){e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(""),this.handleSearch()}},null,!0),$.fn.select2.amd.require(["select2/results"],function(e){e.prototype.ensureHighlightVisible=function(){this.$results.resize()}},null,!0),$.fn.select2.amd.define("select2/wpca/conditionData",["select2/data/array","select2/utils"],function(e,t){function n(e,t){n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype.query=function(n,i){n.term=n.term||"";var o=this.options.options,s=o.cachedResults[n.term],a=n.page||1;if(s&&s.page>=a){if(!(1<a))return void i({results:s.items,pagination:{more:s.more}});a=s.page}clearTimeout(o.searchTimer),o.searchTimer=setTimeout(function(){$.ajax({url:ajaxurl,data:{search:n.term,paged:a,limit:20,action:"wpca/module/"+o.type,sidebar_id:l.sidebarID,nonce:l.nonce},dataType:"JSON",type:"POST",success:function(e){var t=!(e.length<20);o.cachedResults[n.term]={page:a,more:t,items:s?o.cachedResults[n.term].items.concat(e):e},i({results:e,pagination:{more:t}})}})},o.quietMillis)},n}),$.fn.select2.amd.define("select2/wpca/moduleMatcher",["select2/diacritics"],function(t){function l(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}return function e(t,n){if(null==t.term||""===t.term.trim())return n;var i=l(n.text).toUpperCase(),o=l(t.term).toUpperCase();if(-1<i.indexOf(o))return n;if(n.children&&0<n.children.length){for(var s=$.extend(!0,{},n),a=n.children.length-1;0<=a;a--)null==e(t,n.children[a])&&s.children.splice(a,1);return 0<s.children.length?s:e(t,s)}return null}});var i={treshold:2e3,timerQueue:{},start:function(e){this.clear(e);var t=this;this.timerQueue[e.cid]=window.setTimeout(function(){t.set(e)},this.treshold)},set:function(e){e.saveGroup()},clear:function(e){e&&this.timerQueue[e.cid]&&window.clearInterval(this.timerQueue[e.cid])}},l={nonce:$("#_ca_nonce").val(),sidebarID:$("#post_ID").val(),alert:null,wpcaDataAdapter:$.fn.select2.amd.require("select2/wpca/conditionData"),wpcaModuleMatcher:$.fn.select2.amd.require("select2/wpca/moduleMatcher"),init:function(){this.alert=new CAE.Views.Alert({model:new CAE.Models.Alert}),CAE.conditionGroups=new CAE.Views.GroupCollection({collection:new CAE.Models.GroupCollection(WPCA.groups,{parse:!0})})}};$(function(){l.init()})}(jQuery,CAE);
1
+ /*!
2
+ * @package WP Content Aware Engine
3
+ * @author Joachim Jensen <joachim@dev.institute>
4
+ * @license GPLv3
5
+ * @copyright 2020 by Joachim Jensen
6
+ */
7
  var CAE=CAE||{};!function($,CAE){"use strict";CAE.settings={views:{}},CAE.Models={},CAE.Models.Alert=Backbone.Model.extend({defaults:{text:"",success:!0},sync:function(){return!1},url:"",reset:function(){this.set(this.defaults)}}),CAE.Models.Condition=Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:{module:null,label:"",placeholder:"",values:[],default_value:null},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this)},sync:function(){return!1},url:""}),CAE.Models.Group=Backbone.Model.extend({unsaved:{prompt:WPCA.unsaved,unloadWindowPrompt:!0},defaults:function(){var e=WPCA.meta_default;return e.id=null,e.status="wpca_or",e.exposure=1,e},initialize:function(){this.startTracking(),this.on("destroy",this.stopTracking,this),this.conditions||(this.conditions=new CAE.Models.ConditionCollection)},parse:function(e){var t=[];if(_.has(e,"conditions")){for(var n in e.conditions)if(e.conditions.hasOwnProperty(n)){var i=[],o=e.conditions[n];for(var s in o.data)o.data.hasOwnProperty(s)&&i.push({text:"object"==typeof o.data[s]?o.data[s].text:o.data[s],id:s});delete o.data,o.module=n,o.values=i,t.push(o)}delete e.conditions}return this.conditions=new CAE.Models.ConditionCollection(t),e},sync:function(){return!1},url:""}),CAE.Models.GroupCollection=Backbone.Collection.extend({model:CAE.Models.Group,parse:function(e){return e}}),CAE.Models.ConditionCollection=Backbone.Collection.extend({model:CAE.Models.Condition}),CAE.Views={},CAE.Views.Alert=Backbone.Epoxy.View.extend({bindings:"data-vm",tagName:"div",className:"wpca-alert",template:"<div data-vm=\"classes:{'wpca-success':success,'wpca-error':not(success)},text:text\"></div>",timer:4e3,success:function(e){this.model.set({text:e,success:!0})},failure:function(e){this.model.set({text:e,success:!1})},dismiss:function(){var e=this;this.$el.fadeOut("slow",function(){e.model.reset()})},initialize:function(){this.listenTo(this.model,"change:text",this.show),this.$el.appendTo("body").hide().html(this.template)},show:function(){if(""!==this.model.get("text")){this.$el.fadeIn("slow");var e=this;setTimeout(function(){e.dismiss()},this.timer)}}}),CAE.Views.Condition=Backbone.Epoxy.View.extend({bindings:"data-vm",model:CAE.Models.Condition,tagName:"div",className:"cas-condition",templateName:"#wpca-template-condition",events:{"click .js-wpca-condition-remove":"removeModel"},initialize:function(){this.listenTo(this.model,"destroy",this.remove);var e=$(this.templateName);e.length?(this.template=e.html(),this.$el.append(this.template),this.createSuggestInput()):this.model.destroy()},removeModel:function(e){var t=this;this.$el.slideUp(300,function(){t.model.destroy()})},createSuggestInput:function(){var n=this.$el.find(".js-wpca-suggest");if(n.length){var i=this.model,e=this.model.get("values"),t=$("<div></div>").html(i.get("placeholder")).text();n.select2({cachedResults:{},quietMillis:400,searchTimer:null,type:i.get("module"),theme:"wpca",dir:WPCA.text_direction,placeholder:t,minimumInputLength:0,closeOnSelect:!0,width:"100%",language:{noResults:function(){return WPCA.noResults},searching:function(){return WPCA.searching+"..."},loadingMore:function(){return WPCA.loadingMore+"..."}},nextSearchTerm:function(e,t){return t},templateResult:function(e){return e.level?$('<span class="wpca-level-'+e.level+'">'+e.text+"</span>"):e.text},data:e,dataAdapter:l.wpcaDataAdapter,ajax:{}}).on("select2:selecting",function(e){n.data("forceOpen",!0)}).on("select2:closing",function(e){n.data("forceOpen")&&(e.preventDefault(),n.data("forceOpen",!1))}),e.length&&n.val(_.map(e,function(e){return e.id})).trigger("change"),n.on("change",function(e){var t=n.select2("data");i.set("values",t)})}}}),CAE.Views.Group=Backbone.Epoxy.View.extend({bindings:"data-vm",model:CAE.Models.Group,tagName:"li",className:"cas-group-single",template:$("#wpca-template-group").html(),itemView:function(e){if(CAE.Views[e.model.get("module")])var t=new(CAE.Views[e.model.get("module")])(e);else t=new CAE.Views.Condition(e);return t},events:{"click .js-wpca-save-group":"saveGroup","click .js-wpca-options":"showOptions"},computeds:{statusNegated:{deps:["status"],get:function(e){return"negated"==e},set:function(e){var t=e?"negated":"wpca_or";this.setBinding("status",t)}},statusExcept:{deps:["status"],get:function(e){return"wpca_except"==e},set:function(e){var t=e?"wpca_except":"wpca_or";this.setBinding("status",t)}},statusLabel:function(){switch(this.getBinding("status")){case"wpca_except":return WPCA.condition_except;case"negated":return WPCA.condition_not;default:return WPCA.condition_or}}},bindingFilters:{int:{get:function(e){return e?1:0},set:function(e){return e?1:0}},binary:{get:function(e){return e?1:0},set:function(e){return e?1:0}},hasModule:function(e){for(var t={},n=1;n<arguments.length;n++)t[arguments[n]]=!0;return e.filter(function(e){return t.hasOwnProperty(e.get("module"))}).length==arguments.length-1},hasAnyModule:function(e){for(var t={},n=1;n<arguments.length;n++)t[arguments[n]]=!0;return!!e.find(function(e){return t.hasOwnProperty(e.get("module"))})}},initialize:function(){this.collection=this.model.conditions,this.$el.hide().html(this.template).fadeIn(300),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"unsavedChanges",this.saveChanges),this.listenTo(this.model.conditions,"unsavedChanges",this.saveChanges),this.listenTo(this.model.conditions,"add remove",this.saveAddRemove);var i=this,o=$(".js-wpca-add-and",this.$el);o.select2({theme:"wpca",placeholder:"+ "+WPCA.newCondition,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"resolve",matcher:l.wpcaModuleMatcher,nextSearchTerm:function(e,t){return t},data:WPCA.conditions}).on("select2:select",function(e){var t=e.params.data;if(!i.model.conditions.findWhere({module:t.id})){var n=new CAE.Models.Condition({module:t.id,label:t.text,placeholder:t.placeholder,default_value:t.default_value});i.model.conditions.add(n)}o.val(null).trigger("change")})},showOptions:function(e){$(e.delegateTarget).find(".cas-group-options").slideToggle(200),$(e.currentTarget).toggleClass("active")},saveChanges:function(e,t){e&&i.start(this)},saveAddRemove:function(e,t,n){t.length?n.add?""!==e.get("default_value")&&i.start(this):this.model.get("id")&&i.start(this):(i.clear(this),this.model.get("id")?this.saveGroup():this.removeModel())},removeModel:function(){var e=this;this.$el.slideUp(400,function(){e.model.destroy()})},saveGroup:function(e){var i=this.$el.find(".spinner"),o=this.$el.find(".js-wpca-save-group"),t=this,n=_.clone(this.model.attributes);n.action="wpca/add-rule",n.token=l.nonce,n.current_id=l.sidebarID,n.post_type=WPCA.post_type,n.conditions={},this.model.conditions.each(function(e){e.get("values").length?n.conditions[e.get("module")]=e.get("values").map(function(e){return e.id}):""!==e.get("default_value")&&(n.conditions[e.get("module")]=[e.get("default_value")])}),o.attr("disabled",!0),i.addClass("is-active"),$.ajax({url:ajaxurl,data:n,dataType:"JSON",type:"POST",success:function(e){l.alert.success(e.message),e.removed?t.removeModel():e.new_post_id&&t.model.set("id",e.new_post_id,{silent:!0}),e.removed||(o.hide(),i.removeClass("is-active"),t.model.restartTracking(),t.model.conditions.each(function(e){e.restartTracking()}))},error:function(e,t,n){o.attr("disabled",!1).show(),i.removeClass("is-active"),l.alert.failure(e.responseJSON.data)}})},slideRemove:function(){this.$el.slideUp(400,function(){this.remove()})}}),CAE.Views.GroupCollection=Backbone.Epoxy.View.extend({bindings:"data-vm",el:"#cas-groups",collection:CAE.Models.GroupCollection,events:{"click .js-wpca-add-quick":"addGroupQuick","click .js-wpca-save":"saveAll"},conditionsById:{},initialize:function(){var o=this;this.conditionsById=_.chain(WPCA.conditions).pluck(["children"]).flatten().indexBy("id").value();var s=$(".js-wpca-add-or",this.$el);s.select2({theme:"wpca",placeholder:"+ "+WPCA.newGroup,minimumInputLength:0,closeOnSelect:!0,allowClear:!1,width:"auto",matcher:l.wpcaModuleMatcher,nextSearchTerm:function(e,t){return t},data:WPCA.conditions}).on("select2:select",function(e){var t=e.params.data,n=new CAE.Models.Group,i=new CAE.Models.Condition({module:t.id,label:t.text,placeholder:t.placeholder,default_value:t.default_value});o.collection.add(n),n.conditions.add(i),s.val(null).trigger("change")})},itemView:function(e){return new CAE.Views.Group(e)},addGroupQuick:function(e){e.preventDefault();var t=$(e.currentTarget).data("config"),n=new CAE.Models.Group;for(var i in n.set(t.options),this.collection.add(n),t.modules)if(this.conditionsById.hasOwnProperty(t.modules[i])){var o=this.conditionsById[t.modules[i]],s=new CAE.Models.Condition({module:o.id,label:o.text,placeholder:o.placeholder,default_value:o.default_value});n.conditions.add(s)}}}),$.fn.select2.amd.require(["select2/selection/search"],function(e){e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(""),this.handleSearch()}},null,!0),$.fn.select2.amd.require(["select2/results"],function(e){e.prototype.ensureHighlightVisible=function(){this.$results.resize()}},null,!0),$.fn.select2.amd.define("select2/wpca/conditionData",["select2/data/array","select2/utils"],function(e,t){function n(e,t){n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype.query=function(n,i){n.term=n.term||"";var o=this.options.options,s=o.cachedResults[n.term],a=n.page||1;if(s&&s.page>=a){if(!(1<a))return void i({results:s.items,pagination:{more:s.more}});a=s.page}clearTimeout(o.searchTimer),o.searchTimer=setTimeout(function(){$.ajax({url:ajaxurl,data:{search:n.term,paged:a,limit:20,action:"wpca/module/"+o.type,sidebar_id:l.sidebarID,nonce:l.nonce},dataType:"JSON",type:"POST",success:function(e){var t=!(e.length<20);o.cachedResults[n.term]={page:a,more:t,items:s?o.cachedResults[n.term].items.concat(e):e},i({results:e,pagination:{more:t}})}})},o.quietMillis)},n}),$.fn.select2.amd.define("select2/wpca/moduleMatcher",["select2/diacritics"],function(t){function l(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}return function e(t,n){if(null==t.term||""===t.term.trim())return n;var i=l(n.text).toUpperCase(),o=l(t.term).toUpperCase();if(-1<i.indexOf(o))return n;if(n.children&&0<n.children.length){for(var s=$.extend(!0,{},n),a=n.children.length-1;0<=a;a--)null==e(t,n.children[a])&&s.children.splice(a,1);return 0<s.children.length?s:e(t,s)}return null}});var i={treshold:2e3,timerQueue:{},start:function(e){this.clear(e);var t=this;this.timerQueue[e.cid]=window.setTimeout(function(){t.set(e)},this.treshold)},set:function(e){e.saveGroup()},clear:function(e){e&&this.timerQueue[e.cid]&&window.clearInterval(this.timerQueue[e.cid])}},l={nonce:$("#_ca_nonce").val(),sidebarID:$("#post_ID").val(),alert:null,wpcaDataAdapter:$.fn.select2.amd.require("select2/wpca/conditionData"),wpcaModuleMatcher:$.fn.select2.amd.require("select2/wpca/moduleMatcher"),init:function(){this.alert=new CAE.Views.Alert({model:new CAE.Models.Alert}),CAE.conditionGroups=new CAE.Views.GroupCollection({collection:new CAE.Models.GroupCollection(WPCA.groups,{parse:!0})})}};$(function(){l.init()})}(jQuery,CAE);
lib/wp-content-aware-engine/bootstrap.php CHANGED
@@ -12,7 +12,7 @@ defined('ABSPATH') || exit;
12
  * Version of this WPCA
13
  * @var string
14
  */
15
- $this_wpca_version = '9.1.1.2';
16
 
17
  /**
18
  * Class to make sure the latest
12
  * Version of this WPCA
13
  * @var string
14
  */
15
+ $this_wpca_version = '9.1.1.3';
16
 
17
  /**
18
  * Class to make sure the latest
lib/wp-content-aware-engine/core.php CHANGED
@@ -668,12 +668,15 @@ GROUP BY p.post_type, m.meta_key
668
  */
669
  public static function add_group_meta_box($post_type, $post)
670
  {
 
 
 
671
  self::render_group_meta_box($post, $post_type, 'normal', 'default');
672
  }
673
 
674
  public static function render_group_meta_box($post, $screen, $context = 'normal', $priority = 'default')
675
  {
676
- if (!self::types()->has($post->post_type)) {
677
  return;
678
  }
679
 
@@ -882,7 +885,7 @@ GROUP BY p.post_type, m.meta_key
882
  );
883
 
884
  if (self::types()->has($current_screen->post_type) && $current_screen->base == 'post') {
885
- self::enqueue_scripts_styles($hook);
886
  }
887
  }
888
 
@@ -909,9 +912,9 @@ GROUP BY p.post_type, m.meta_key
909
  * @param string $hook
910
  * @return void
911
  */
912
- public static function enqueue_scripts_styles($hook)
913
  {
914
- $post_type = get_post_type();
915
 
916
  $group_meta = self::get_condition_meta_keys($post_type);
917
 
668
  */
669
  public static function add_group_meta_box($post_type, $post)
670
  {
671
+ if(is_null($post)) {
672
+ return;
673
+ }
674
  self::render_group_meta_box($post, $post_type, 'normal', 'default');
675
  }
676
 
677
  public static function render_group_meta_box($post, $screen, $context = 'normal', $priority = 'default')
678
  {
679
+ if (is_null($post) || !self::types()->has($post->post_type)) {
680
  return;
681
  }
682
 
885
  );
886
 
887
  if (self::types()->has($current_screen->post_type) && $current_screen->base == 'post') {
888
+ self::enqueue_scripts_styles($current_screen->post_type);
889
  }
890
  }
891
 
912
  * @param string $hook
913
  * @return void
914
  */
915
+ public static function enqueue_scripts_styles($post_type = '')
916
  {
917
+ $post_type = empty($post_type) ? get_post_type() : $post_type;
918
 
919
  $group_meta = self::get_condition_meta_keys($post_type);
920
 
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === Lightweight Widget Area Plugin - Content Aware Sidebars ===
2
  Contributors: intoxstudio, devinstitute, freemius
3
  Donate link: #
4
  Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress, buddypress, sidebar manager
5
- Requires at least: 4.8
6
  Requires PHP: 5.6
7
- Tested up to: 5.5
8
- Stable tag: 3.13.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.
@@ -18,15 +18,9 @@ You can optimize conversion rates, boost on-site SEO, upsell products, and much
18
 
19
  If your website is big or in growth, CAS is the ideal solution for you.
20
 
21
- ####Add Unlimited Sidebars & Widget Areas
22
 
23
- Replace your theme sidebars on different conditions, or insert widget areas with shortcodes. With the All-in-one Sidebar Manager, you can easily activate and deactivate widget areas, and you can even schedule them for specific times.
24
-
25
- > Sidebars - Quick Select&copy; lets you add or select widget areas directly when editing a post or page.
26
-
27
- ####Show or Hide Widgets on Any Page (Yes, any)
28
-
29
- Create a post sidebar, a page sidebar, a category sidebar, or any custom sidebar you need. The following Display Conditions are available out of the box:
30
 
31
  * Posts, Pages & Custom Post Types
32
  * Content with Tags, Categories, or Custom Taxonomies
@@ -41,23 +35,29 @@ Create a post sidebar, a page sidebar, a category sidebar, or any custom sidebar
41
  * Languages (WPML, Polylang, qTranslate X, TranslatePress, Transposh)
42
  * Pods Pages
43
 
44
- > You can even combine conditions in any way you like! E.g. target all posts in a select category and written by a specific author.
 
 
45
 
46
- ####Customize Your Widget Areas Your Way
47
 
48
- Without writing any code, you can modify the HTML and CSS classes of widget areas, widgets, and widget titles. You get full control over the look and feel of your sidebars and widget areas, no matter what theme you use.
49
 
50
- > Sidebar Visibility lets you elegantly hide any widget area for logged-out users.
 
 
 
 
51
 
52
  ####The Most User-friendly Widget Manager
53
 
54
- If you have more than just a few widgets and widget areas, you will love the Enhanced Widget Manager. When adding new widgets to sidebars, Live Search will find widgets in seconds, and the smart split-screen gives you a much better overview of your widget options.
55
 
56
- > 1-Click Sidebar Activation&copy; lets you activate or deactivate widget areas instantly.
57
 
58
- ####Sidebar Plugin Integrations & Support
59
 
60
- CAS automatically supports Custom Post Types and Taxonomies created by any plugin or theme. Built-in support for some of the most popular WordPress plugins means that you e.g. can create WooCommerce sidebars for select products or BuddyPress sidebars for your members.
61
 
62
  * [bbPress](https://dev.institute/wordpress-sidebars/bbpress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
63
  * [BuddyPress](https://dev.institute/wordpress-sidebars/buddypress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
@@ -70,10 +70,15 @@ CAS automatically supports Custom Post Types and Taxonomies created by any plugi
70
  * [WooCommerce](https://dev.institute/wordpress-sidebars/woocommerce/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
71
  * [WPML](https://dev.institute/wordpress-sidebars/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
72
 
 
 
 
 
 
73
 
74
  **Content Aware Sidebars Pro - [Complete control for your widget areas](https://dev.institute/wordpress-sidebars/?utm_source=readme&utm_medium=referral&utm_content=title&utm_campaign=cas)**
75
 
76
- ####Highlighted Premium Features
77
 
78
  * **Sticky Sidebars & Widget Areas**
79
  Make any sidebar or widget area sticky without hurting site performance. No jQuery and no bloat.
@@ -105,7 +110,7 @@ A real time-saver when adding new similar widget areas
105
 
106
  Upgrade at anytime instantly and securely from your website's Admin Dashboard.
107
 
108
- ####More Information
109
 
110
  * [Documentation](https://dev.institute/docs/content-aware-sidebars/?utm_source=readme&utm_medium=referral&utm_content=info&utm_campaign=cas)
111
  * [GitHub](https://github.com/intoxstudio/content-aware-sidebars)
@@ -120,7 +125,7 @@ Upgrade at anytime instantly and securely from your website's Admin Dashboard.
120
 
121
  = Do I need to know widget logic PHP code? =
122
 
123
- Of course not.
124
 
125
  CAS is praised by users for its unparalleled sidebar and widget visibility options. It's the only plugin that allows you to display widget areas on literally any condition without any code.
126
 
@@ -133,16 +138,9 @@ If your theme already has WordPress sidebars and widget areas, you can create ne
133
  You can also display custom sidebars using the sidebar shortcode [ca-sidebar id=""] anywhere in your content.
134
 
135
  If your theme has a built-in sidebar generator, it is recommended to disable it and/or only use CAS for maximum speed and compatibility.
136
-
137
- = Will this plugin work with page builders? =
138
-
139
- Yes!
140
-
141
- Many users already mix CAS with popular page builder plugins such as Elementor, SiteOrigin Page Builder, Beaver Builder, and Visual Composer.
142
-
143
  = Can I really display sidebars and widget areas on any page? =
144
 
145
- Yep.
146
 
147
  In the Sidebar Editor, you can select where, when and to whom your sidebar should be displayed. Create a sidebar for each page, a sidebar for posts in a category, or any sidebar you need, all in a user-friendly UI.
148
 
@@ -150,6 +148,20 @@ You can also select sidebars directly when you're editing a post or page.
150
 
151
  [Click here to read more about Display Conditions](https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-simple/?utm_source=readme&utm_medium=referral&utm_content=faq&utm_campaign=cas).
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  = I have other questions, can you help? =
154
 
155
  Of course! Check out the links below:
@@ -172,6 +184,20 @@ Of course! Check out the links below:
172
 
173
  ####Highlights
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  = 3.13.1 =
176
 
177
  * [new] identical taxonomy names are now displayed with their post type
1
+ === Unlimited Custom Sidebars - Content Aware Sidebars ===
2
  Contributors: intoxstudio, devinstitute, freemius
3
  Donate link: #
4
  Tags: custom sidebars, sidebar, hide sidebar, display widgets, widget, bbpress, buddypress, sidebar manager
5
+ Requires at least: 4.9
6
  Requires PHP: 5.6
7
+ Tested up to: 5.6
8
+ Stable tag: 3.14
9
  License: GPLv3
10
 
11
  Display new sidebars and widget areas on any post, page, category etc. Works with all themes, no code required.
18
 
19
  If your website is big or in growth, CAS is the ideal solution for you.
20
 
21
+ ###Show or Hide Widgets on Any Page (Yes, any)
22
 
23
+ **Replace your theme sidebars on different conditions**, or insert widget areas with shortcodes. The following Display Conditions are available out of the box:
 
 
 
 
 
 
24
 
25
  * Posts, Pages & Custom Post Types
26
  * Content with Tags, Categories, or Custom Taxonomies
35
  * Languages (WPML, Polylang, qTranslate X, TranslatePress, Transposh)
36
  * Pods Pages
37
 
38
+ > **You can even combine conditions in any way you like! E.g. target all posts in a select category and written by a specific author.**
39
+
40
+ ###Add Unlimited Sidebars & Widget Areas
41
 
42
+ Create a post sidebar, a page sidebar, a category sidebar, or any custom sidebar you need - no coding required. **CAS will never slow down your site**, even if you create a lot of custom sidebars and conditions.
43
 
44
+ > **Sidebars - Quick Select&copy; lets you add or select widget areas directly when editing a post or page.**
45
 
46
+ ###Schedule & Disable Custom Sidebars
47
+
48
+ In the All-in-one Sidebar Manager you **just pick a start and end date** for when widget areas should be displayed, and CAS will take care of the rest.
49
+
50
+ > **1-Click Sidebar Activation&copy; lets you activate or deactivate widget areas instantly.**
51
 
52
  ####The Most User-friendly Widget Manager
53
 
54
+ When adding new widgets to sidebars, **Live Search will find widgets instantly**, and the smart split-screen makes it a joy to manage a lot of widgets and sidebars.
55
 
56
+ > **The Enhanced Widget Manager adds the signature turquoise line to easily identify custom sidebars.**
57
 
58
+ ###Sidebar Plugin Integrations & Support
59
 
60
+ **CAS autodetects Custom Post Types and Taxonomies** created by any plugin or theme. Built-in support for some of the most popular WordPress plugins means that you e.g. can create WooCommerce sidebars for select products or BuddyPress sidebars for your members.
61
 
62
  * [bbPress](https://dev.institute/wordpress-sidebars/bbpress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
63
  * [BuddyPress](https://dev.institute/wordpress-sidebars/buddypress/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
70
  * [WooCommerce](https://dev.institute/wordpress-sidebars/woocommerce/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
71
  * [WPML](https://dev.institute/wordpress-sidebars/multilingual-plugins/?utm_source=readme&utm_medium=referral&utm_content=integration&utm_campaign=cas)
72
 
73
+ ###Customize Your Widget Areas Your Way
74
+
75
+ Without writing any code, you can **modify the HTML and CSS classes** of widget areas, widgets, and widget titles. You get full control over the look and feel of your sidebars and widget areas, no matter what theme you use.
76
+
77
+ > **Sidebar Visibility lets you elegantly hide any widget area for logged-out users.**
78
 
79
  **Content Aware Sidebars Pro - [Complete control for your widget areas](https://dev.institute/wordpress-sidebars/?utm_source=readme&utm_medium=referral&utm_content=title&utm_campaign=cas)**
80
 
81
+ ###Highlighted Premium Features
82
 
83
  * **Sticky Sidebars & Widget Areas**
84
  Make any sidebar or widget area sticky without hurting site performance. No jQuery and no bloat.
110
 
111
  Upgrade at anytime instantly and securely from your website's Admin Dashboard.
112
 
113
+ ###More Information
114
 
115
  * [Documentation](https://dev.institute/docs/content-aware-sidebars/?utm_source=readme&utm_medium=referral&utm_content=info&utm_campaign=cas)
116
  * [GitHub](https://github.com/intoxstudio/content-aware-sidebars)
125
 
126
  = Do I need to know widget logic PHP code? =
127
 
128
+ Of course not!
129
 
130
  CAS is praised by users for its unparalleled sidebar and widget visibility options. It's the only plugin that allows you to display widget areas on literally any condition without any code.
131
 
138
  You can also display custom sidebars using the sidebar shortcode [ca-sidebar id=""] anywhere in your content.
139
 
140
  If your theme has a built-in sidebar generator, it is recommended to disable it and/or only use CAS for maximum speed and compatibility.
 
 
 
 
 
 
 
141
  = Can I really display sidebars and widget areas on any page? =
142
 
143
+ Yes!
144
 
145
  In the Sidebar Editor, you can select where, when and to whom your sidebar should be displayed. Create a sidebar for each page, a sidebar for posts in a category, or any sidebar you need, all in a user-friendly UI.
146
 
148
 
149
  [Click here to read more about Display Conditions](https://dev.institute/docs/content-aware-sidebars/getting-started/display-sidebar-simple/?utm_source=readme&utm_medium=referral&utm_content=faq&utm_campaign=cas).
150
 
151
+ = Is this plugin Gutenberg-ready? =
152
+
153
+ Yes!
154
+
155
+ Gutenberg is the New Block Editor that has been part of WordPress since version 5.0. CAS will support Block-based Widgets and Widget Areas (Block Areas) when they get implemented in WordPress Core as planned.
156
+
157
+ Moreover, the Pro version makes it possible to infuse widget areas into theme hooks, as well as insert areas between content paragraphs.
158
+
159
+ = Will this plugin work with page builders? =
160
+
161
+ Yes!
162
+
163
+ Many users already compliment CAS with popular page builder plugins such as Elementor, SiteOrigin Page Builder, Beaver Builder, and Visual Composer.
164
+
165
  = I have other questions, can you help? =
166
 
167
  Of course! Check out the links below:
184
 
185
  ####Highlights
186
 
187
+ = 3.14 =
188
+
189
+ * [new] ability to replace or merge with multiple sidebars
190
+ * [new] wordpress 5.6 support
191
+ * [new] minimum wordpress version 4.9
192
+ * [fixed] some custom sidebar styles would not take effect in wp5.6+
193
+ * [updated] wp-content-aware-engine library
194
+
195
+ **Pro Plan:**
196
+
197
+ * [new] time schedule displayed on overview screen
198
+ * [fixed] conditions would not be duplicated with sidebar
199
+ * [updated] improved time schedule ui
200
+
201
  = 3.13.1 =
202
 
203
  * [new] identical taxonomy names are now displayed with their post type
sidebar.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
@@ -170,8 +170,8 @@ final class CAS_Sidebar_Manager
170
  ->add(new WPCAMeta(
171
  'host',
172
  __('Target Sidebar', 'content-aware-sidebars'),
173
- 'sidebar-1',
174
- 'select',
175
  array()
176
  ), 'host')
177
  ->add(new WPCAMeta(
@@ -217,6 +217,7 @@ final class CAS_Sidebar_Manager
217
  if (get_the_ID()) {
218
  unset($sidebar_list[CAS_App::SIDEBAR_PREFIX.get_the_ID()]);
219
  }
 
220
  $this->metadata->get('host')->set_input_list($sidebar_list);
221
 
222
  if (!cas_fs()->can_use_premium_code()) {
@@ -363,6 +364,39 @@ final class CAS_Sidebar_Manager
363
  }
364
  }
365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  /**
367
  * Replace or merge a sidebar with content aware sidebars.
368
  * @since .
@@ -380,47 +414,79 @@ final class CAS_Sidebar_Manager
380
  $posts = WPCACore::get_posts(CAS_App::TYPE_SIDEBAR);
381
 
382
  if ($posts) {
383
- global $wp_registered_sidebars;
384
-
385
  $metadata = $this->metadata();
386
  $has_host = array(0 => 1,1 => 1,3 => 1);
387
 
 
388
  foreach ($posts as $post) {
389
  $id = CAS_App::SIDEBAR_PREFIX . $post->ID;
390
- $host = $metadata->get('host')->get_data($post->ID);
391
 
392
- // Check for correct handling and if host exist
393
- if (!isset($has_host[$post->handle]) || !isset($sidebars_widgets[$host])) {
394
  continue;
395
  }
396
 
397
- // Sidebar might not have any widgets. Get it anyway!
398
- if (!isset($sidebars_widgets[$id])) {
399
- $sidebars_widgets[$id] = array();
400
- }
401
 
402
- // If handle is merge or if handle is replace and host has already been replaced
403
- if ($post->handle == 1 || ($post->handle == 0 && isset($handled_already[$host]))) {
404
- //do not merge forced replace
405
- //todo: maybe reverse order of fetched sidebars instead?
406
- if (isset($handled_already[$host]) && $handled_already[$host] == 3) {
407
  continue;
408
  }
409
- if ($metadata->get('merge_pos')->get_data($post->ID)) {
410
- $sidebars_widgets[$host] = array_merge($sidebars_widgets[$host], $sidebars_widgets[$id]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  } else {
412
- $sidebars_widgets[$host] = array_merge($sidebars_widgets[$id], $sidebars_widgets[$host]);
 
413
  }
414
- } else {
415
- $sidebars_widgets[$host] = $sidebars_widgets[$id];
416
- $handled_already[$host] = $post->handle;
417
- }
418
 
419
- //last replacement will take priority
420
- //todo: extend to work for widgets too
421
- $this->replace_map[$host] = $id;
 
422
  }
423
  $this->replaced_sidebars = $sidebars_widgets;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  }
425
  return $sidebars_widgets;
426
  }
@@ -513,6 +579,7 @@ final class CAS_Sidebar_Manager
513
  if (is_active_sidebar($id) && apply_filters('cas/shortcode/display', true, $a['id'])) {
514
  ob_start();
515
  do_action('cas/shortcode/before', $a['id']);
 
516
  dynamic_sidebar($id);
517
  $content = ob_get_clean();
518
  }
@@ -534,7 +601,7 @@ final class CAS_Sidebar_Manager
534
  $metadata = $this->metadata()->get('html');
535
  while ($i) {
536
  if (isset($this->sidebars[$i])) {
537
- $style = apply_filters('cas/sidebar/html', $metadata->get_data($this->sidebars[$i]->ID), $this->sidebars[$i]->ID);
538
  if ($style) {
539
  $styles = array_merge($styles, $style);
540
  $styles['widget_id'] = '%1$s';
@@ -550,6 +617,7 @@ final class CAS_Sidebar_Manager
550
  /**
551
  * Render html if present before sidebar
552
  *
 
553
  * @since 3.6
554
  * @param string $i
555
  * @param boolean $has_widgets
@@ -557,30 +625,9 @@ final class CAS_Sidebar_Manager
557
  */
558
  public function render_sidebar_before($i, $has_widgets)
559
  {
560
- global $wp_registered_sidebars;
561
-
562
- //Get nested styles
563
- $html = $this->get_sidebar_styles($i);
564
- if ($html) {
565
- $styles = $wp_registered_sidebars[$i];
566
- //Set user styles
567
- foreach (array(
568
- 'widget',
569
- 'title',
570
- 'sidebar'
571
- ) as $pos) {
572
- if (isset($html[$pos],$html[$pos.'_class'])) {
573
- $e = esc_html($html[$pos]);
574
- $class = esc_html($html[$pos.'_class']);
575
- $id = '';
576
- if (isset($html[$pos.'_id'])) {
577
- $id = ' id="'.$html[$pos.'_id'].'"';
578
- }
579
- $styles['before_'.$pos] = '<'.$e.$id.' class="'.$class.'">';
580
- $styles['after_'.$pos] = "</$e>";
581
- }
582
- }
583
- $wp_registered_sidebars[$i] = $styles;
584
  }
585
 
586
  if ($has_widgets && isset($wp_registered_sidebars[$i]['before_sidebar'])) {
@@ -591,6 +638,7 @@ final class CAS_Sidebar_Manager
591
  /**
592
  * Render html if present after sidebar
593
  *
 
594
  * @since 3.6
595
  * @param string $i
596
  * @param boolean $has_widgets
@@ -598,6 +646,10 @@ final class CAS_Sidebar_Manager
598
  */
599
  public function render_sidebar_after($i, $has_widgets)
600
  {
 
 
 
 
601
  global $wp_registered_sidebars;
602
  if ($has_widgets && isset($wp_registered_sidebars[$i]['after_sidebar'])) {
603
  echo $wp_registered_sidebars[$i]['after_sidebar'];
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  defined('ABSPATH') || exit;
170
  ->add(new WPCAMeta(
171
  'host',
172
  __('Target Sidebar', 'content-aware-sidebars'),
173
+ array(),
174
+ 'multi',
175
  array()
176
  ), 'host')
177
  ->add(new WPCAMeta(
217
  if (get_the_ID()) {
218
  unset($sidebar_list[CAS_App::SIDEBAR_PREFIX.get_the_ID()]);
219
  }
220
+ asort($sidebar_list);
221
  $this->metadata->get('host')->set_input_list($sidebar_list);
222
 
223
  if (!cas_fs()->can_use_premium_code()) {
364
  }
365
  }
366
 
367
+ /**
368
+ * @param string $i
369
+ * @return void
370
+ */
371
+ public function override_sidebar_styles($i)
372
+ {
373
+ //Get nested styles
374
+ $html = $this->get_sidebar_styles($i);
375
+ if ($html) {
376
+ global $wp_registered_sidebars;
377
+ $styles = $wp_registered_sidebars[$i];
378
+ //Set user styles
379
+ foreach (array(
380
+ 'widget',
381
+ 'title',
382
+ 'sidebar'
383
+ ) as $pos) {
384
+ if (isset($html[$pos],$html[$pos.'_class'])) {
385
+ $e = esc_html($html[$pos]);
386
+ $class = esc_html($html[$pos.'_class']);
387
+ $id = '';
388
+ if (isset($html[$pos.'_id'])) {
389
+ $id = ' id="'.$html[$pos.'_id'].'"';
390
+ }
391
+ $styles['before_'.$pos] = '<'.$e.$id.' class="'.$class.'">';
392
+ $styles['after_'.$pos] = "</$e>";
393
+ }
394
+ }
395
+ $wp_registered_sidebars[$i] = $styles;
396
+ }
397
+ }
398
+
399
+
400
  /**
401
  * Replace or merge a sidebar with content aware sidebars.
402
  * @since .
414
  $posts = WPCACore::get_posts(CAS_App::TYPE_SIDEBAR);
415
 
416
  if ($posts) {
 
 
417
  $metadata = $this->metadata();
418
  $has_host = array(0 => 1,1 => 1,3 => 1);
419
 
420
+ //replace and merge widgets, build replacement map
421
  foreach ($posts as $post) {
422
  $id = CAS_App::SIDEBAR_PREFIX . $post->ID;
 
423
 
424
+ // Check for correct handling
425
+ if (!isset($has_host[$post->handle])) {
426
  continue;
427
  }
428
 
429
+ $hosts = $metadata->get('host')->get_data($post->ID, false, false);
 
 
 
430
 
431
+ foreach ($hosts as $host) {
432
+
433
+ // Check if host exist
434
+ if (!isset($sidebars_widgets[$host])) {
 
435
  continue;
436
  }
437
+
438
+ $this->override_sidebar_styles($host);
439
+
440
+ // Sidebar might not have any widgets. Get it anyway!
441
+ if (!isset($sidebars_widgets[$id])) {
442
+ $sidebars_widgets[$id] = array();
443
+ }
444
+
445
+ // If handle is merge or if handle is replace and host has already been replaced
446
+ if ($post->handle == 1 || ($post->handle == 0 && isset($handled_already[$host]))) {
447
+ //do not merge forced replace
448
+ //todo: maybe reverse order of fetched sidebars instead?
449
+ if (isset($handled_already[$host]) && $handled_already[$host] == 3) {
450
+ continue;
451
+ }
452
+ if ($metadata->get('merge_pos')->get_data($post->ID)) {
453
+ $sidebars_widgets[$host] = array_merge($sidebars_widgets[$host], $sidebars_widgets[$id]);
454
+ } else {
455
+ $sidebars_widgets[$host] = array_merge($sidebars_widgets[$id], $sidebars_widgets[$host]);
456
+ }
457
  } else {
458
+ $sidebars_widgets[$host] = $sidebars_widgets[$id];
459
+ $handled_already[$host] = $post->handle;
460
  }
 
 
 
 
461
 
462
+ //last replacement will take priority
463
+ //todo: extend to work for widgets too
464
+ $this->replace_map[$host] = $id;
465
+ }
466
  }
467
  $this->replaced_sidebars = $sidebars_widgets;
468
+
469
+ //override styles
470
+ foreach ($posts as $post) {
471
+ $id = CAS_App::SIDEBAR_PREFIX . $post->ID;
472
+
473
+ // Check for correct handling
474
+ if (!isset($has_host[$post->handle])) {
475
+ $this->override_sidebar_styles($id);
476
+ continue;
477
+ }
478
+
479
+ $hosts = $metadata->get('host')->get_data($post->ID, false, false);
480
+
481
+ foreach ($hosts as $host) {
482
+ // Check if host exist
483
+ if (!isset($sidebars_widgets[$host])) {
484
+ continue;
485
+ }
486
+
487
+ $this->override_sidebar_styles($host);
488
+ }
489
+ }
490
  }
491
  return $sidebars_widgets;
492
  }
579
  if (is_active_sidebar($id) && apply_filters('cas/shortcode/display', true, $a['id'])) {
580
  ob_start();
581
  do_action('cas/shortcode/before', $a['id']);
582
+ $this->override_sidebar_styles($id);
583
  dynamic_sidebar($id);
584
  $content = ob_get_clean();
585
  }
601
  $metadata = $this->metadata()->get('html');
602
  while ($i) {
603
  if (isset($this->sidebars[$i])) {
604
+ $style = apply_filters('cas/sidebar/html', $metadata->get_data($this->sidebars[$i]->ID, true), $this->sidebars[$i]->ID);
605
  if ($style) {
606
  $styles = array_merge($styles, $style);
607
  $styles['widget_id'] = '%1$s';
617
  /**
618
  * Render html if present before sidebar
619
  *
620
+ * @deprecated since WP5.6
621
  * @since 3.6
622
  * @param string $i
623
  * @param boolean $has_widgets
625
  */
626
  public function render_sidebar_before($i, $has_widgets)
627
  {
628
+ //wp5.6 introduced before_sidebar without notice
629
+ if (version_compare(get_bloginfo('version'),'5.6', '>=')) {
630
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  }
632
 
633
  if ($has_widgets && isset($wp_registered_sidebars[$i]['before_sidebar'])) {
638
  /**
639
  * Render html if present after sidebar
640
  *
641
+ * @deprecated since WP5.6
642
  * @since 3.6
643
  * @param string $i
644
  * @param boolean $has_widgets
646
  */
647
  public function render_sidebar_after($i, $has_widgets)
648
  {
649
+ //wp5.6 introduced after_sidebar without notice
650
+ if (version_compare(get_bloginfo('version'),'5.6', '>=')) {
651
+ return;
652
+ }
653
  global $wp_registered_sidebars;
654
  if ($has_widgets && isset($wp_registered_sidebars[$i]['after_sidebar'])) {
655
  echo $wp_registered_sidebars[$i]['after_sidebar'];
view/meta_box_action.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  CAS_Sidebar_Edit::form_field('handle');
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  CAS_Sidebar_Edit::form_field('handle');
view/meta_box_advanced.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  if (!EMPTY_TRASH_DAYS) {
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  if (!EMPTY_TRASH_DAYS) {
view/meta_box_design.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $url = 'https://dev.institute/wordpress-sidebars/pricing/?utm_source=plugin&utm_medium=popup&utm_content=design&utm_campaign=cas';
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $url = 'https://dev.institute/wordpress-sidebars/pricing/?utm_source=plugin&utm_medium=popup&utm_content=design&utm_campaign=cas';
view/meta_box_html.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $data = CAS_App::instance()->manager()->metadata()->get('html')->get_data($post->ID, true);
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $data = CAS_App::instance()->manager()->metadata()->get('html')->get_data($post->ID, true);
view/meta_box_schedule.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  global $wp_locale;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  global $wp_locale;
view/meta_box_status.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $activate_date = $post->post_status == CAS_App::STATUS_SCHEDULED ? $post->post_date : '';
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $activate_date = $post->post_status == CAS_App::STATUS_SCHEDULED ? $post->post_date : '';
view/meta_box_submit.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $cas_fs = cas_fs();
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $cas_fs = cas_fs();
view/meta_box_support.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $locale = get_locale();
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $locale = get_locale();
view/notice_review.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  //updated class for wp4.0 and below
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  //updated class for wp4.0 and below
view/sidebars_quick_select.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
- * @copyright 2019 by Joachim Jensen
7
  */
8
 
9
  $i = 0;
3
  * @package Content Aware Sidebars
4
  * @author Joachim Jensen <joachim@dev.institute>
5
  * @license GPLv3
6
+ * @copyright 2020 by Joachim Jensen
7
  */
8
 
9
  $i = 0;