PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.0.7
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.0.7
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / admin / globals.php
widget-options / includes / admin Last commit date
settings 2 years ago globals.php 2 years ago import-export.php 2 years ago notices.php 1 year ago welcome.php 2 years ago
globals.php
47 lines
1 <?php
2
3 /**
4 * Add values to global variables
5 *
6 *
7 * @copyright Copyright (c) 2017, Jeffrey Carandang
8 * @since 3.3.1
9 */
10
11 if (!function_exists('widgetopts_register_globals')) {
12 add_action('init', 'widgetopts_register_globals', 90);
13 function widgetopts_register_globals()
14 {
15 global $widgetopts_taxonomies, $widgetopts_types, $widgetopts_categories;
16
17 $widgetopts_taxonomies = widgetopts_global_taxonomies();
18 $widgetopts_types = widgetopts_global_types();
19 $widgetopts_categories = widgetopts_global_categories();
20 }
21 }
22
23 if (!function_exists('widgetopts_removed_widget_cached')) {
24 add_action('admin_init', 'widgetopts_removed_widget_cached', 90);
25 function widgetopts_removed_widget_cached()
26 {
27 $cached = get_option('widgetopts_editor_cached');
28 if ($cached) {
29 $_cached = json_decode($cached, true);
30 if (isset($_cached) && !empty($_cached)) {
31 $_cached = (array) $_cached;
32 if (is_iterable($_cached)) {
33 foreach ($_cached as $key => $c) {
34 if (!empty($c['widgetopts_expiry'])) {
35 if (time() > strtotime($c['widgetopts_expiry'])) {
36 unset($_cached[$key]);
37 }
38 }
39 }
40
41 update_option('widgetopts_editor_cached', json_encode($_cached));
42 }
43 }
44 }
45 }
46 }
47