Version Description
View Release Notes
- Added: display only active shortcode sidebars
- Added: UI improvements
- Added: wordpress 4.9 support
- Fixed: visibility for sidebars inserted with shortcodes
Pro Plan:
- Added: time schedule for shortcode sidebars
Download this release
Release Info
Developer | intoxstudio |
Plugin | Content Aware Sidebars – Unlimited Widget Areas |
Version | 3.7.1 |
Comparing to | |
See all releases |
Code changes from version 3.7 to 3.7.1
- admin/sidebar-overview.php +2 -0
- app.php +1 -1
- content-aware-sidebars.php +2 -2
- css/style.css +1 -1
- freemius.php +4 -2
- js/widgets.min.js +6 -6
- lib/wp-content-aware-engine/bootstrap.php +3 -2
- lib/wp-content-aware-engine/core.php +16 -24
- readme.txt +15 -4
- sidebar.php +33 -6
admin/sidebar-overview.php
CHANGED
@@ -169,6 +169,8 @@ final class CAS_Sidebar_Overview extends CAS_Admin {
|
|
169 |
|
170 |
check_admin_referer('bulk-sidebars');
|
171 |
|
|
|
|
|
172 |
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
|
173 |
|
174 |
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
169 |
|
170 |
check_admin_referer('bulk-sidebars');
|
171 |
|
172 |
+
$pagenum = $this->table->get_pagenum();
|
173 |
+
|
174 |
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
|
175 |
|
176 |
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
app.php
CHANGED
@@ -17,7 +17,7 @@ final class CAS_App {
|
|
17 |
/**
|
18 |
* Plugin version
|
19 |
*/
|
20 |
-
const PLUGIN_VERSION = '3.7';
|
21 |
|
22 |
/**
|
23 |
* Prefix for sidebar id
|
17 |
/**
|
18 |
* Plugin version
|
19 |
*/
|
20 |
+
const PLUGIN_VERSION = '3.7.1';
|
21 |
|
22 |
/**
|
23 |
* Prefix for sidebar id
|
content-aware-sidebars.php
CHANGED
@@ -7,9 +7,9 @@
|
|
7 |
*/
|
8 |
/*
|
9 |
Plugin Name: Content Aware Sidebars
|
10 |
-
Plugin URI: https://dev.institute/wordpress
|
11 |
Description: Unlimited custom sidebars and widget areas for any post, page, category etc.
|
12 |
-
Version: 3.7
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
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.7.1
|
13 |
Author: Joachim Jensen
|
14 |
Author URI: https://dev.institute
|
15 |
Text Domain: content-aware-sidebars
|
css/style.css
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* @author Joachim Jensen <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
* @copyright 2017 by Joachim Jensen
|
6 |
-
*/#submitdiv .handlediv,#submitdiv .hndle,.cas-section,.js-cas-action{display:none}#cas-rules .cas-heart{color:#ac170a}.nav-tab-active:focus{box-shadow:none}.cas-input-sm{max-width:65px;font-size:.8em;vertical-align:middle}#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-bottom:14px}.cas-pro-label{background-color:#31c455;border-radius:5px;color:#fff;padding:3px 8px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}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;-ms-touch-action:none;touch-action:none;text-align:center;border-radius:12px;transition:background .2s ease}.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 .hndle{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-widgets{width:8%}.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-handle{width:25%}.wp-list-table.fixed .column-status{width:12%}.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{margin:10px 10px 0;float:right;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input{display:none}.widget-liquid-right .widgets-holder-wrap .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}.widget-liquid-right .widgets-holder-wrap .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 0s;box-shadow:0 1px 2px rgba(0,0,0,.2)}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.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:all .4s ease;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 16px 0 0;float:right;display:inline-block}.cas-filter-sidebar .button,.cas-filter-sidebar input{margin:12px 0 11px}.cas-filter-sidebar input{float:right}.cas-filter-widget{margin:10px 0}body.branch-3-9 .cas-filter-sidebar.wp-filter{background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;color:#555;display:inline-block;font-size:13px;margin:9pt 0 25px;padding:0 10px;position:relative;width:100%}body.branch-3-9 .cas-filter-sidebar.wp-filter input,body.branch-3-9 .cas-filter-widget{padding:3px 5px;line-height:initial}@media (min-width:783px){.cas-widget-manager:not(.widgets_access) #screen-meta{z-index:20}.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 5px 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 .cas-filter-widget{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 h1{margin:0 calc(38% + 56px) 0 0}.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}}@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 (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 <jv@intox.dk>
|
4 |
* @license GPLv3
|
5 |
* @copyright 2017 by Joachim Jensen
|
6 |
+
*/#submitdiv .handlediv,#submitdiv .hndle,.cas-section,.js-cas-action{display:none}#cas-rules .cas-heart{color:#ac170a}.nav-tab-active:focus{box-shadow:none}.cas-input-sm{max-width:65px;font-size:.8em;vertical-align:middle}#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-bottom:14px}.cas-pro-label{background-color:#31c455;border-radius:5px;color:#fff;padding:3px 8px;text-transform:uppercase;vertical-align:baseline;white-space:nowrap;font-weight:700}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;-ms-touch-action:none;touch-action:none;text-align:center;border-radius:12px;transition:background .2s ease}.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 .hndle{border-bottom-color:#9fcadf;box-shadow:0 -1px #fff inset}.wp-list-table.fixed.striped>tbody>:nth-child(2n+1){background-color:#f9f9f9}.wp-list-table.fixed .column-widgets{width:8%}.wp-list-table.fixed .column-visibility{width:20%}.wp-list-table.fixed .column-handle{width:25%}.wp-list-table.fixed .column-status{width:12%}.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{margin:10px 10px 0;float:right;position:relative;width:28px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;box-sizing:border-box}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input{display:none}.widget-liquid-right .widgets-holder-wrap .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}.widget-liquid-right .widgets-holder-wrap .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 0s;box-shadow:0 1px 2px rgba(0,0,0,.2)}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label{background-color:#7ad03a}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:checked+.sidebar-status-label:before{right:2px}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input.sidebar-status-future:not(:checked)+.sidebar-status-label{background-color:#ffb900}.widget-liquid-right .widgets-holder-wrap .sidebar-status .sidebar-status-input:disabled+.sidebar-status-label{cursor:auto}.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:all .4s ease;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 16px 0 0;float:right;display:inline-block}.cas-filter-sidebar .button,.cas-filter-sidebar input{margin:12px 0 11px}.cas-filter-sidebar input{float:right}.cas-filter-widget{margin:10px 0}body.branch-3-9 .cas-filter-sidebar.wp-filter{background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;color:#555;display:inline-block;font-size:13px;margin:9pt 0 25px;padding:0 10px;position:relative;width:100%}body.branch-3-9 .cas-filter-sidebar.wp-filter input,body.branch-3-9 .cas-filter-widget{padding:3px 5px;line-height:initial}@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 .notice,.cas-widget-manager:not(.widgets_access) .wrap h1{margin:0 0 0 calc(38% + 56px)}.cas-widget-manager:not(.widgets_access) #available-widgets{z-index:1;position:fixed;top:32px;padding:0 10px;background:#fafafa;box-shadow:0 0 5px 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 .cas-filter-widget{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 .notice,.cas-widget-manager:not(.widgets_access).rtl .wrap h1{margin:0 calc(38% + 56px) 0 0}.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}}@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 (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%}}
|
freemius.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @copyright 2017 by Joachim Jensen
|
8 |
*/
|
9 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
-
|
11 |
}
|
12 |
//<wp4.5 compatibility
|
13 |
if ( !function_exists( 'wp_get_raw_referer' ) ) {
|
@@ -104,4 +104,6 @@ if ( $cas_fs->is_on() ) {
|
|
104 |
} elseif ( is_admin() ) {
|
105 |
//after_uninstall is only run for new users
|
106 |
register_uninstall_hook( plugin_dir_path( __FILE__ ) . 'content-aware-sidebars.php', 'cas_fs_uninstall' );
|
107 |
-
}
|
|
|
|
7 |
* @copyright 2017 by Joachim Jensen
|
8 |
*/
|
9 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
}
|
12 |
//<wp4.5 compatibility
|
13 |
if ( !function_exists( 'wp_get_raw_referer' ) ) {
|
104 |
} elseif ( is_admin() ) {
|
105 |
//after_uninstall is only run for new users
|
106 |
register_uninstall_hook( plugin_dir_path( __FILE__ ) . 'content-aware-sidebars.php', 'cas_fs_uninstall' );
|
107 |
+
}
|
108 |
+
|
109 |
+
//eol
|
js/widgets.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
/*!
|
2 |
-
* @package Content Aware Sidebars
|
3 |
-
* @author Joachim Jensen <jv@intox.dk>
|
4 |
-
* @license GPLv3
|
5 |
-
* @copyright 2017 by Joachim Jensen
|
6 |
-
*/
|
7 |
!function(a){var b={$sidebarContainer:a(".widget-liquid-right"),$widgetContainer:a("#available-widgets"),init:function(){this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.toggleSidebarStatus(),this.enhancedWidgetManager()},openSidebarByURL:function(){if(window.location.hash){var a=this.$sidebarContainer.find(".widgets-holder-wrap"),b=a.has(window.location.hash);b.length&&b.add(a.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")}},enhancedWidgetManager:function(){if(a("body").hasClass("cas-widget-manager")){this.$widgetContainer.find(".widget").draggable("option","scroll",!1);var b=this,c=a("#widgets-left .inactive-sidebar");c.toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(a){c.toggle(b.$widgetContainer.hasClass("closed"))})}},toggleSidebarStatus:function(){a(".widget-liquid-right").on("change",".sidebar-status-input",function(b){var c=a(this),d=c.is(":checked");!c.hasClass("sidebar-status-future")||confirm(CASAdmin.enableConfirm)?a.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:c.val(),status:d},function(a){a.success?(c.next().attr("title",a.data.title),c.removeClass("sidebar-status-future")):c.attr("checked",!d)}):c.attr("checked",!d)})},addWidgetSearch:function(){var b=a(".widget",this.$widgetContainer).get().reverse();a(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter-widget" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(b)},searchWidgetListener:function(b){var c,d="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var f=a(this).val();f!=d&&(d=f,c&&clearTimeout(c),c=setTimeout(function(){a(b).each(function(b,c){var d=a(c);d.find(".widget-title :nth-child(1)").text().search(new RegExp(f,"i"))<0?d.fadeOut():(d.prependTo(d.parent()),d.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var a='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><input type="search" class="js-cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div>';this.$sidebarContainer.prepend(a),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var b=a(document),c=this.$sidebarContainer.find(".widgets-holder-wrap");a("body").on("click",".js-sidebars-toggle",function(d){d.preventDefault();var e=!!a(this).data("toggle");c.toggleClass("closed",!e),e&&c.children(".widgets-sortables").sortable("refresh"),b.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var b,c=this,d="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var f=a(this).val();f!=d&&(d=f,b&&clearTimeout(b),b=setTimeout(function(){a(".widgets-holder-wrap",c.$sidebarContainer).each(function(b,c){var d=a(c);d.find(".sidebar-name :nth-child(2)").text().search(new RegExp(f,"i"))<0?d.fadeOut():d.fadeIn()})},250))})}};a(document).ready(function(){b.init()})}(jQuery);
|
1 |
+
/*!
|
2 |
+
* @package Content Aware Sidebars
|
3 |
+
* @author Joachim Jensen <jv@intox.dk>
|
4 |
+
* @license GPLv3
|
5 |
+
* @copyright 2017 by Joachim Jensen
|
6 |
+
*/
|
7 |
!function(a){var b={$sidebarContainer:a(".widget-liquid-right"),$widgetContainer:a("#available-widgets"),init:function(){this.openSidebarByURL(),this.addSidebarToolbar(),this.addWidgetSearch(),this.toggleSidebarStatus(),this.enhancedWidgetManager()},openSidebarByURL:function(){if(window.location.hash){var a=this.$sidebarContainer.find(".widgets-holder-wrap"),b=a.has(window.location.hash);b.length&&b.add(a.first()).find(".handlediv,.sidebar-name-arrow").trigger("click")}},enhancedWidgetManager:function(){if(a("body").hasClass("cas-widget-manager")){this.$widgetContainer.find(".widget").draggable("option","scroll",!1);var b=this,c=a("#widgets-left .inactive-sidebar");c.toggle(this.$widgetContainer.hasClass("closed")),this.$widgetContainer.find(".sidebar-name").click(function(a){c.toggle(b.$widgetContainer.hasClass("closed"))})}},toggleSidebarStatus:function(){a(".widget-liquid-right").on("change",".sidebar-status-input",function(b){var c=a(this),d=c.is(":checked");!c.hasClass("sidebar-status-future")||confirm(CASAdmin.enableConfirm)?a.post(ajaxurl,{action:"cas_sidebar_status",sidebar_id:c.val(),status:d},function(a){a.success?(c.next().attr("title",a.data.title),c.removeClass("sidebar-status-future")):c.attr("checked",!d)}):c.attr("checked",!d)})},addWidgetSearch:function(){var b=a(".widget",this.$widgetContainer).get().reverse();a(".sidebar-description",this.$widgetContainer).prepend('<input type="search" class="js-cas-widget-filter cas-filter-widget" placeholder="'+CASAdmin.filterWidgets+'...">'),this.searchWidgetListener(b)},searchWidgetListener:function(b){var c,d="";this.$widgetContainer.on("input",".js-cas-widget-filter",function(e){var f=a(this).val();f!=d&&(d=f,c&&clearTimeout(c),c=setTimeout(function(){a(b).each(function(b,c){var d=a(c);d.find(".widget-title :nth-child(1)").text().search(new RegExp(f,"i"))<0?d.fadeOut():(d.prependTo(d.parent()),d.fadeIn().css("display",""))})},250))})},addSidebarToolbar:function(){var a='<div class="wp-filter cas-filter-sidebar"><a href="admin.php?page=wpcas-edit" class="button button-primary">'+CASAdmin.addNew+'</a><input type="search" class="js-cas-filter" placeholder="'+CASAdmin.filterSidebars+'..."><a href="#" title="'+CASAdmin.collapse+'" class="js-sidebars-toggle sidebars-toggle" data-toggle="0"><span class="dashicons dashicons-arrow-up-alt2"></span></a><a href="#" title="'+CASAdmin.expand+'" class="js-sidebars-toggle sidebars-toggle" data-toggle="1"><span class="dashicons dashicons-arrow-down-alt2"></span></a></div>';this.$sidebarContainer.prepend(a),this.searchSidebarListener(),this.addSidebarToggle()},addSidebarToggle:function(){var b=a(document),c=this.$sidebarContainer.find(".widgets-holder-wrap");a("body").on("click",".js-sidebars-toggle",function(d){d.preventDefault();var e=!!a(this).data("toggle");c.toggleClass("closed",!e),e&&c.children(".widgets-sortables").sortable("refresh"),b.triggerHandler("wp-pin-menu")})},searchSidebarListener:function(){var b,c=this,d="";this.$sidebarContainer.on("input",".js-cas-filter",function(e){var f=a(this).val();f!=d&&(d=f,b&&clearTimeout(b),b=setTimeout(function(){a(".widgets-holder-wrap",c.$sidebarContainer).each(function(b,c){var d=a(c);d.find(".sidebar-name :nth-child(2)").text().search(new RegExp(f,"i"))<0?d.fadeOut():d.fadeIn()})},250))})}};a(document).ready(function(){b.init()})}(jQuery);
|
lib/wp-content-aware-engine/bootstrap.php
CHANGED
@@ -13,7 +13,7 @@ if (!defined('ABSPATH')) {
|
|
13 |
* Version of this WPCA
|
14 |
* @var string
|
15 |
*/
|
16 |
-
$this_wpca_version = '4.2';
|
17 |
|
18 |
/**
|
19 |
* Class to make sure the latest
|
@@ -84,7 +84,8 @@ if(!class_exists('WPCALoader')) {
|
|
84 |
}
|
85 |
|
86 |
}
|
87 |
-
|
|
|
88 |
}
|
89 |
WPCALoader::add(plugin_dir_path( __FILE__ ),$this_wpca_version);
|
90 |
|
13 |
* Version of this WPCA
|
14 |
* @var string
|
15 |
*/
|
16 |
+
$this_wpca_version = '4.2.1';
|
17 |
|
18 |
/**
|
19 |
* Class to make sure the latest
|
84 |
}
|
85 |
|
86 |
}
|
87 |
+
//Hook as early as possible after plugins are loaded
|
88 |
+
add_action('plugins_loaded',array('WPCALoader','load'),-999999);
|
89 |
}
|
90 |
WPCALoader::add(plugin_dir_path( __FILE__ ),$this_wpca_version);
|
91 |
|
lib/wp-content-aware-engine/core.php
CHANGED
@@ -303,9 +303,10 @@ if(!class_exists('WPCACore')) {
|
|
303 |
}
|
304 |
}
|
305 |
|
306 |
-
// Check if there are any
|
307 |
-
if(empty($where))
|
308 |
return array();
|
|
|
309 |
|
310 |
$post_status = array(
|
311 |
self::STATUS_PUBLISHED,
|
@@ -341,28 +342,30 @@ if(!class_exists('WPCACore')) {
|
|
341 |
//Force update of meta cache to prevent lazy loading
|
342 |
update_meta_cache('post',array_keys($groups_in_context+$groups_negated));
|
343 |
|
|
|
344 |
$valid = array();
|
345 |
-
foreach($groups_in_context as $
|
346 |
-
$valid[$
|
347 |
}
|
348 |
|
349 |
-
//Exclude
|
350 |
foreach ($excluded as $module) {
|
351 |
$valid = $module->filter_excluded_context($valid);
|
352 |
}
|
353 |
|
354 |
-
//Filter negated
|
|
|
355 |
$handled_already = array_flip($valid);
|
356 |
-
foreach($groups_negated as $
|
357 |
-
if(isset($valid[$
|
358 |
-
unset($valid[$
|
359 |
} else {
|
360 |
-
$valid[$
|
361 |
}
|
362 |
-
if(isset($handled_already[$
|
363 |
-
unset($valid[$
|
364 |
}
|
365 |
-
$handled_already[$
|
366 |
}
|
367 |
|
368 |
foreach ($cache as $cache_type) {
|
@@ -398,17 +401,6 @@ if(!class_exists('WPCACore')) {
|
|
398 |
self::$post_cache[$post_type] = array();
|
399 |
|
400 |
if($valid) {
|
401 |
-
|
402 |
-
$metas = array();
|
403 |
-
$joins = array();
|
404 |
-
$wheres = array();
|
405 |
-
$i = 0;
|
406 |
-
foreach ($metas as $meta) {
|
407 |
-
$key = 'm'.++$i;
|
408 |
-
$joins[] = "INNER JOIN $wpdb->postmeta $key ON $key.post_id = p.ID AND $key.meta_key = '{$meta["key"]}'";
|
409 |
-
$wheres[] = $key.'.meta_value '.$meta["compare"]." '".$meta["value"]."'";
|
410 |
-
}
|
411 |
-
|
412 |
$results = $wpdb->get_results("
|
413 |
SELECT
|
414 |
p.ID,
|
303 |
}
|
304 |
}
|
305 |
|
306 |
+
// Check if there are any conditions for current content
|
307 |
+
if(empty($where)) {
|
308 |
return array();
|
309 |
+
}
|
310 |
|
311 |
$post_status = array(
|
312 |
self::STATUS_PUBLISHED,
|
342 |
//Force update of meta cache to prevent lazy loading
|
343 |
update_meta_cache('post',array_keys($groups_in_context+$groups_negated));
|
344 |
|
345 |
+
//condition group => type
|
346 |
$valid = array();
|
347 |
+
foreach($groups_in_context as $group) {
|
348 |
+
$valid[$group->ID] = $group->post_parent;
|
349 |
}
|
350 |
|
351 |
+
//Exclude types that have unrelated content in same group
|
352 |
foreach ($excluded as $module) {
|
353 |
$valid = $module->filter_excluded_context($valid);
|
354 |
}
|
355 |
|
356 |
+
//Filter negated groups
|
357 |
+
//type => group
|
358 |
$handled_already = array_flip($valid);
|
359 |
+
foreach($groups_negated as $group) {
|
360 |
+
if(isset($valid[$group->ID])) {
|
361 |
+
unset($valid[$group->ID]);
|
362 |
} else {
|
363 |
+
$valid[$group->ID] = $group->post_parent;
|
364 |
}
|
365 |
+
if(isset($handled_already[$group->post_parent])) {
|
366 |
+
unset($valid[$group->ID]);
|
367 |
}
|
368 |
+
$handled_already[$group->post_parent] = 1;
|
369 |
}
|
370 |
|
371 |
foreach ($cache as $cache_type) {
|
401 |
self::$post_cache[$post_type] = array();
|
402 |
|
403 |
if($valid) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
$results = $wpdb->get_results("
|
405 |
SELECT
|
406 |
p.ID,
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Content Aware Sidebars - Unlimited Widget Areas ===
|
2 |
Contributors: intoxstudio, devinstitute, freemius
|
3 |
Donate link: #
|
4 |
-
Tags: custom sidebars,
|
5 |
Requires at least: 4.1
|
6 |
Requires PHP: 5.2.4
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 3.7
|
9 |
License: GPLv3
|
10 |
|
11 |
Display widget areas and custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, WPML, and more.
|
@@ -161,10 +161,21 @@ Of course! Check out the links below:
|
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
-
= 3.7 =
|
165 |
|
166 |
[View Release Notes](https://dev.institute/blog/design-insert-widget-areas-content-aware-sidebars-3-7/?utm_source=readme&utm_medium=referral&utm_content=changelog&utm_campaign=cas)
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
* Added: visibility for sidebars inserted with shortcodes
|
169 |
* Added: icon navigation to custom sidebars on widgets screen
|
170 |
* Added: quick select uses less memory and has better theme sidebar recognition
|
1 |
=== Content Aware Sidebars - Unlimited Widget Areas ===
|
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.1
|
6 |
Requires PHP: 5.2.4
|
7 |
+
Tested up to: 4.9
|
8 |
+
Stable tag: 3.7.1
|
9 |
License: GPLv3
|
10 |
|
11 |
Display widget areas and custom sidebars on any post, page, category etc. Supports bbPress, BuddyPress, WooCommerce, WPML, and more.
|
161 |
|
162 |
== Changelog ==
|
163 |
|
164 |
+
= 3.7.1 =
|
165 |
|
166 |
[View Release Notes](https://dev.institute/blog/design-insert-widget-areas-content-aware-sidebars-3-7/?utm_source=readme&utm_medium=referral&utm_content=changelog&utm_campaign=cas)
|
167 |
|
168 |
+
* Added: display only active shortcode sidebars
|
169 |
+
* Added: UI improvements
|
170 |
+
* Added: wordpress 4.9 support
|
171 |
+
* Fixed: visibility for sidebars inserted with shortcodes
|
172 |
+
|
173 |
+
**Pro Plan:**
|
174 |
+
|
175 |
+
* Added: time schedule for shortcode sidebars
|
176 |
+
|
177 |
+
= 3.7 =
|
178 |
+
|
179 |
* Added: visibility for sidebars inserted with shortcodes
|
180 |
* Added: icon navigation to custom sidebars on widgets screen
|
181 |
* Added: quick select uses less memory and has better theme sidebar recognition
|
sidebar.php
CHANGED
@@ -76,6 +76,8 @@ final class CAS_Sidebar_Manager {
|
|
76 |
array(__CLASS__,'filter_password_protection'));
|
77 |
add_filter('wpca/posts/sidebar',
|
78 |
array($this,'filter_visibility'));
|
|
|
|
|
79 |
add_action( 'dynamic_sidebar_before',
|
80 |
array($this,'render_sidebar_before'),9,2);
|
81 |
add_action( 'dynamic_sidebar_after',
|
@@ -452,12 +454,11 @@ final class CAS_Sidebar_Manager {
|
|
452 |
|
453 |
//if sidebar is in replacement map, shortcode is called wrongly
|
454 |
//todo: check for handle instead?
|
455 |
-
if(!isset($this->replace_map[$id])) {
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
}
|
461 |
}
|
462 |
return $content;
|
463 |
}
|
@@ -585,6 +586,32 @@ final class CAS_Sidebar_Manager {
|
|
585 |
return $sidebars;
|
586 |
}
|
587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
/**
|
589 |
* Runs is_active_sidebar for sidebars
|
590 |
* Widget management in Theme Customizer
|
76 |
array(__CLASS__,'filter_password_protection'));
|
77 |
add_filter('wpca/posts/sidebar',
|
78 |
array($this,'filter_visibility'));
|
79 |
+
add_filter('cas/shortcode/display',
|
80 |
+
array($this,'filter_shortcode_visibility'),10,2);
|
81 |
add_action( 'dynamic_sidebar_before',
|
82 |
array($this,'render_sidebar_before'),9,2);
|
83 |
add_action( 'dynamic_sidebar_after',
|
454 |
|
455 |
//if sidebar is in replacement map, shortcode is called wrongly
|
456 |
//todo: check for handle instead?
|
457 |
+
if(isset($this->sidebars[$id]) && $this->sidebars[$id]->post_status == CAS_App::STATUS_ACTIVE && !isset($this->replace_map[$id]) && is_active_sidebar($id) && apply_filters('cas/shortcode/display',true,$a['id'])) {
|
458 |
+
ob_start();
|
459 |
+
do_action('cas/shortcode/before',$a['id']);
|
460 |
+
dynamic_sidebar($id);
|
461 |
+
$content = ob_get_clean();
|
|
|
462 |
}
|
463 |
return $content;
|
464 |
}
|
586 |
return $sidebars;
|
587 |
}
|
588 |
|
589 |
+
/**
|
590 |
+
* Filter shortcode sidebar based on current user
|
591 |
+
*
|
592 |
+
* @since 3.7.1
|
593 |
+
* @param boolean $retval
|
594 |
+
* @param int $id
|
595 |
+
* @return boolean
|
596 |
+
*/
|
597 |
+
public function filter_shortcode_visibility($retval,$id) {
|
598 |
+
if($retval) {
|
599 |
+
$metadata = $this->metadata()->get('visibility');
|
600 |
+
|
601 |
+
//temporary filter until WPCACore allows filtering
|
602 |
+
$user_visibility = is_user_logged_in() ? array(-1) : array();
|
603 |
+
$user_visibility = apply_filters('cas/user_visibility',$user_visibility);
|
604 |
+
|
605 |
+
$visibility = $metadata->get_data($id,true,false);
|
606 |
+
|
607 |
+
// Check visibility
|
608 |
+
if($visibility && !array_intersect($visibility,$user_visibility)) {
|
609 |
+
$retval = false;
|
610 |
+
}
|
611 |
+
}
|
612 |
+
return $retval;
|
613 |
+
}
|
614 |
+
|
615 |
/**
|
616 |
* Runs is_active_sidebar for sidebars
|
617 |
* Widget management in Theme Customizer
|