PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.0.5
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.0.5
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 / widgets / option-tabs / days-dates.php
widget-options / includes / widgets / option-tabs Last commit date
alignment.php 2 years ago animation.php 2 years ago behavior.php 2 years ago days-dates.php 2 years ago devices.php 2 years ago settings.php 2 years ago state.php 2 years ago styling.php 2 years ago upsell.php 2 years ago visibility.php 2 years ago
days-dates.php
113 lines
1 <?php
2
3 /**
4 * Days and Dates Widget Options
5 *
6 * @copyright Copyright (c) 2015, Jeffrey Carandang
7 * @since 1.0
8 */
9
10 // Exit if accessed directly
11 if (!defined('ABSPATH')) exit;
12
13 /**
14 * Add Days & Dates Widget Options Tab
15 *
16 * @since 1.0
17 * @return void
18 */
19
20 /**
21 * Called on 'extended_widget_opts_tabs'
22 * create new tab navigation for alignment options
23 */
24 function widgetopts_tab_days($args)
25 { ?>
26 <li class="extended-widget-opts-tab-days">
27 <a href="#extended-widget-opts-tab-<?php echo $args['id']; ?>-days" title="<?php _e('Days & Dates', 'widget-options'); ?>"><span class="dashicons dashicons-calendar-alt"></span> <span class="tabtitle"><?php _e('Days', 'widget-options'); ?></span></a>
28 </li>
29 <?php
30 }
31 add_action('extended_widget_opts_tabs', 'widgetopts_tab_days', 5);
32
33 /**
34 * Called on 'extended_widget_opts_tabcontent'
35 * create new tab content options for alignment options
36 */
37 function widgetopts_tabcontent_days($args)
38 {
39 global $widget_options;
40 $days = array(
41 'monday' => __('Monday', 'widget-options'),
42 'tuesday' => __('Tuesday', 'widget-options'),
43 'wednesday' => __('Wednesday', 'widget-options'),
44 'thursday' => __('Thursday', 'widget-options'),
45 'friday' => __('Friday', 'widget-options'),
46 'saturday' => __('Saturday', 'widget-options'),
47 'sunday' => __('Sunday', 'widget-options'),
48 );
49 $options_role = '';
50 $options_dates = '';
51 $from = '';
52 $to = '';
53 ?>
54 <div id="extended-widget-opts-tab-<?php echo $args['id']; ?>-days" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-days">
55 <div class="extended-widget-opts-demo-feature">
56 <div class="extended-widget-opts-demo-warning">
57 <p class="widgetopts-unlock-features">
58 <span class="dashicons dashicons-lock"></span><br>
59 Unlock all Features<br>
60 <a href="https://widget-options.com/?utm_source=wordpressadmin&amp;utm_medium=widgettabs&amp;utm_campaign=widgetoptsprotab" class="button-primary" target="_blank">Learn More</a>
61 </p>
62 </div>
63 <p>
64 <strong><?php _e('Hide/Show', 'widget-options'); ?></strong>
65 <select class="widefat" readonly>
66 <option value="hide"><?php _e('Hide on checked days', 'widget-options'); ?></option>
67 <option value="show"><?php _e('Show on checked days', 'widget-options'); ?></option>
68 </select>
69 </p>
70 <table class="form-table">
71 <tbody>
72 <tr valign="top">
73 <td scope="row"><strong><?php _e('Days', 'widget-options'); ?></strong></td>
74 <td>&nbsp;</td>
75 </tr>
76 <?php foreach ($days as $key => $day) {
77 $checked = '';
78 ?>
79 <tr valign="top">
80 <td scope="row"><label><?php echo $day; ?></label></td>
81 <td>
82 <input type="checkbox" value="1" readonly />
83 </td>
84 </tr>
85 <?php } ?>
86 </tbody>
87 </table>
88 <br />
89
90 <p>
91 <strong><?php _e('Hide/Show', 'widget-options'); ?></strong>
92 <select class="widefat" readonly>
93 <option value="hide"><?php _e('Hide on date range', 'widget-options'); ?></option>
94 <option value="show"><?php _e('Show on date range', 'widget-options'); ?></option>
95 </select>
96 </p>
97 <table class="form-table">
98 <tbody>
99 <tr valign="top">
100 <td scope="row"><strong><?php _e('From: ', 'widget-options'); ?></strong></td>
101 <td><input type="text" class="widefat extended-widget-opts-date" readonly /></td>
102 </tr>
103 <tr valign="top">
104 <td scope="row"><strong><?php _e('To: ', 'widget-options'); ?></strong></td>
105 <td><input type="text" class="widefat extended-widget-opts-date" readonly /></td>
106 </tr>
107 </tbody>
108 </table>
109 </div>
110 </div>
111 <?php
112 }
113 add_action('extended_widget_opts_tabcontent', 'widgetopts_tabcontent_days'); ?>