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