PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.2.3
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.2.3
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 / settings / display-settings.php
widget-options / includes / admin / settings Last commit date
modules 2 months ago display-settings.php 2 months ago migration-page.php 2 months ago register-settings.php 2 months ago
display-settings.php
133 lines
1 <?php
2
3 /**
4 * Admin Options Page
5 * Settings > Widget Options
6 *
7 * @copyright Copyright (c) 2017, Jeffrey Carandang
8 * @since 4.1
9 */
10 // Exit if accessed directly
11 if (!defined('ABSPATH')) exit;
12
13 /**
14 * Creates the admin submenu pages under the Settings menu and assigns their
15 *
16 * @since 1.0
17 * @return void
18 */
19 if (!function_exists('widgetopts_add_options_link')) :
20 function widgetopts_add_options_link()
21 {
22 add_options_page(
23 __('Widget Options', 'widget-options'),
24 __('Widget Options', 'widget-options'),
25 'manage_options',
26 'widgetopts_plugin_settings',
27 'widgetopts_options_page'
28 );
29 }
30 add_action('admin_menu', 'widgetopts_add_options_link', 10);
31 endif;
32
33 /**
34 * Options Page
35 *
36 * Renders the options page contents.
37 *
38 * @since 1.0
39 * @return void
40 */
41 if (!function_exists('widgetopts_options_page')) :
42 function widgetopts_options_page()
43 {
44 $view = 'grid'; //define so that we can add more views later on
45 $upgrade_url = apply_filters('widget_options_site_url', trailingslashit(WIDGETOPTS_PLUGIN_WEBSITE) . '?utm_source=wordpressadmin&utm_medium=widget&utm_campaign=widgetoptsproupgrade');
46 ?>
47 <div class="wrap">
48 <h1>
49 <?php _e('Widget Options', 'widget-options'); ?>
50 <a href="<?php echo esc_url(apply_filters('widget_options_support_url', 'https://wordpress.org/support/plugin/widget-options/')); ?>" target="_blank" class="page-title-action"><?php _e('Support', 'widget-options'); ?></a>
51 <a href="<?php echo esc_url(apply_filters('widget_options_upgrade_url', $upgrade_url)); ?>" target="_blank" class="page-title-action"><?php _e('Upgrade', 'widget-options'); ?></a>
52 </h1>
53
54 <div id="widgetopts-settings-messages-container"></div>
55 <div class="widgetopts-settings-desc">
56 <?php _e('Enable or disable any widget options tabs using this option. Some features has settings configuration that you can take advantage of to get the most out of Widget Options Extended on fully managing your widgets.', 'widget-options'); ?>
57 </div>
58 <div class="widgetopts-badge widgetopts-badge-settings">
59 <span class="widgetopts-mascot"></span>
60 </div>
61
62 <!-- <div class="widgetopts-get-latest-updates">
63 <h2><?php _e('Get the latest updates and features from Widget Options!', 'widget-options'); ?></h2>
64 <h2><?php _e('Email', 'widget-options'); ?>:</h2>
65 <input type="email" name="widgetopts_update_and_feaures_email" />
66 <button id="widgetoptsSubmitUpdateFeaturesEmail" class="button button-secondary">Submit</button>
67 </div> -->
68
69 <div id="poststuff" class="widgetopts-poststuff">
70 <div id="post-body" class="metabox-holder columns-2 hide-if-no-js">
71 <div id="postbox-container-2" class="postbox-container">
72
73 <div class="widgetopts-module-cards-container <?php echo $view; ?> hide-if-no-js">
74 <form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=widgetopts_plugin_settings" id="widgetopts-module-settings-form">
75 <ul class="widgetopts-module-cards">
76 <?php echo do_action('widgetopts_module_cards'); ?>
77 </ul>
78 </form>
79 </div>
80 <div class="widgetopts-modal-background"></div>
81 </div>
82
83 <div id="postbox-container-1" class="postbox-container">
84 <?php echo do_action('widgetopts_module_sidebar'); ?>
85 </div>
86
87 </div>
88 </div>
89 </div>
90 <?php
91 }
92 endif;
93
94 /**
95 * Modal Wrapper
96 *
97 * Create callable modal wrappers to avoid writing same code again
98 *
99 * @since 4.0
100 * @return void
101 */
102 if (!function_exists('widgetopts_modal_start')) :
103 function widgetopts_modal_start($option = null)
104 { ?>
105 <div class="widgetopts-module-settings-container">
106 <div class="widgetopts-modal-navigation">
107 <button class="dashicons widgetopts-close-modal"></button>
108 </div>
109 <div class="widgetopts-module-settings-content-container">
110 <div class="widgetopts-module-settings-content">
111 <?php }
112 endif;
113
114 if (!function_exists('widgetopts_modal_end')) :
115 function widgetopts_modal_end($option = null)
116 { ?>
117 </div>
118 </div>
119 <div class="widgetopts-list-content-footer hide-if-no-js">
120 <button class="button button-primary align-left widgetopts-module-settings-save"><?php _e('Save Settings', 'widget-options'); ?></button>
121 <button class="button button-secondary align-left widgetopts-module-settings-cancel"><?php _e('Cancel', 'widget-options'); ?></button>
122 </div>
123 <div class="widgetopts-modal-content-footer">
124 <?php if ($option == 'activate') { ?>
125 <button class="button button-secondary align-right widgetopts-toggle-activation"><?php _e('Disable', 'widget-options'); ?></button>
126 <?php } else { ?>
127 <button class="button button-primary align-right widgetopts-toggle-activation"><?php _e('Enable', 'widget-options'); ?></button>
128 <?php } ?>
129 <button class="button button-primary align-left widgetopts-module-settings-save"><?php _e('Save Settings', 'widget-options'); ?></button>
130 </div>
131 </div>
132 <?php }
133 endif; ?>