Widget Options - Version 3.7.9

Version Description

  • Compatible with Latest WordPress.
  • Added option to revert Classic Widgets Screen.
  • Fixed admin notices.
Download this release

Release Info

Developer edbertguinto
Plugin Icon 128x128 Widget Options
Version 3.7.9
Comparing to
See all releases

Code changes from version 3.7.8 to 3.7.9

includes/admin/notices.php CHANGED
@@ -38,13 +38,18 @@ if( !function_exists( 'widgetopts_admin_notices' ) ):
38
  $diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' ) ) / (60*60*24));
39
  if( 'yes' != $saved && $diff_intrval >= 7 ){
40
  echo '<div class="widgetopts_notice updated" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);">
41
- <p>Awesome, you\'ve been using <strong>Widget Options</strong> for more than 1 week. <br> May i ask you to give it a <strong>5-star rating</strong> on WordPress? </br>
42
- This will help to spread its popularity and to make this plugin a better one.
43
- <br><br>Your help is much appreciated. Thank you very much,<br> ~ Widget Options Team
 
 
 
 
44
  <ul>
45
- <li><a href="https://wordpress.org/support/view/plugin-reviews/widget-options" class="thankyou" target="_blank" title="Ok, you deserved it" style="font-weight:bold;">'. __( 'Ok, you deserved it', 'widget-options' ) .'</a></li>
46
- <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="I already did" style="font-weight:bold;">'. __( 'I already did', 'widget-options' ) .'</a></li>
47
- <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="No, not good enough" style="font-weight:bold;">'. __( 'No, not good enough, i do not like to rate it!', 'widget-options' ) .'</a></li>
 
48
  </ul>
49
  </div>
50
  <script>
38
  $diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' ) ) / (60*60*24));
39
  if( 'yes' != $saved && $diff_intrval >= 7 ){
40
  echo '<div class="widgetopts_notice updated" style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);">
41
+ <p>Well done! You have been enjoying <strong>Widget Options</strong> for more than a week.
42
+ <br>
43
+ Do you love it? Are you over the moon? Will you give us a <a href="https://wordpress.org/support/view/plugin-reviews/widget-options" class="thankyou" target="_blank" title="Ok, you deserved it" style="font-weight:bold;"><strong>5-star rating</strong></a> on WordPress?
44
+ </br>
45
+ Your review is essential to the Widget Options community and our ongoing succes.
46
+ <br><br>
47
+ Thank you so much! � Your Widget Options Team
48
  <ul>
49
+ <li><a href="https://wordpress.org/support/view/plugin-reviews/widget-options" class="thankyou" target="_blank" title="Ok, you deserved it" style="font-weight:bold;">'. __( 'Definitely. Widget Options is the best!', 'widget-options' ) .'</a></li>
50
+ <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="I already did" style="font-weight:bold;">'. __( 'Already done!', 'widget-options' ) .'</a></li>
51
+ <li><a href="https://widget-options.com/contact/" class="thankyou" target="_blank" title="Ok, you deserved it" style="font-weight:bold;">'. __( "I�m not convinced yet. Still thinking about it.", 'widget-options' ) .'</a></li>
52
+ <li><a href="javascript:void(0);" class="widgetopts_bHideRating" title="No, not good enough" style="font-weight:bold;">'. __( "I don�t do ratings", 'widget-options' ) .'</a></li>
53
  </ul>
54
  </div>
55
  <script>
includes/admin/settings/modules/classic-widgets-screen.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * classic_widgets_screen Settings Module
4
+ * Settings > Widget Options :: Pages classic_widgets_screen
5
+ *
6
+ * @copyright Copyright (c) 2016, Jeffrey Carandang
7
+ * @since 3.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) exit;
12
+
13
+ /**
14
+ * Create Card Module for Pages classic_widgets_screen Options
15
+ *
16
+ * @since 3.0
17
+ * @global $widget_options
18
+ * @return void
19
+ */
20
+ if( !function_exists( 'widgetopts_settings_classic_widgets_screen' ) ):
21
+ function widgetopts_settings_classic_widgets_screen(){
22
+ global $widget_options;
23
+ ?>
24
+ <li class="widgetopts-module-card widgetopts-module-card-no-settings <?php echo ( $widget_options['classic_widgets_screen'] == 'activate' ) ? 'widgetopts-module-type-enabled' : 'widgetopts-module-type-disabled'; ?>" id="widgetopts-module-card-classic_widgets_screen" data-module-id="classic_widgets_screen">
25
+ <div class="widgetopts-module-card-content">
26
+ <h2><?php _e( 'Classic Widgets Screen', 'widget-options' );?></h2>
27
+ <p class="widgetopts-module-desc">
28
+ <?php _e( 'Revert to Classic Widgets Screen (for wordpress version 5.8 and above).', 'widget-options' );?>
29
+ </p>
30
+ <div class="widgetopts-module-actions hide-if-no-js">
31
+ <?php if( $widget_options['classic_widgets_screen'] == 'activate' ){ ?>
32
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Configure Settings', 'widget-options' );?></button>
33
+ <button class="button button-secondary widgetopts-toggle-activation"><?php _e( 'Disable', 'widget-options' );?></button>
34
+ <?php }else{ ?>
35
+ <button class="button button-secondary widgetopts-toggle-settings"><?php _e( 'Learn More', 'widget-options' );?></button>
36
+ <button class="button button-primary widgetopts-toggle-activation"><?php _e( 'Enable', 'widget-options' );?></button>
37
+ <?php } ?>
38
+
39
+ </div>
40
+ </div>
41
+ <?php widgetopts_modal_start( $widget_options['classic_widgets_screen'] ); ?>
42
+ <span class="dashicons widgetopts-dashicons widgetopts-no-top dashicons-admin-generic"></span>
43
+ <h3 class="widgetopts-modal-header"><?php _e( 'Classic Widgets Screen', 'widget-options' );?></h3>
44
+ <p>
45
+ <?php _e( 'While we work on a more permanent integration to Gutenberg, here is an easy way to keep using Widget Options! Simply toggle this option on to revert to WordPress\' usual widget control screen.', 'widget-options' );?>
46
+ </p>
47
+ <p class="widgetopts-settings-section">
48
+ <?php _e( 'No additional settings available.', 'widget-options' );?>
49
+ </p>
50
+ <?php widgetopts_modal_end( $widget_options['classic_widgets_screen'] ); ?>
51
+ </li>
52
+ <?php
53
+ }
54
+ add_action( 'widgetopts_module_cards', 'widgetopts_settings_classic_widgets_screen', 10 );
55
+ endif;
56
+ ?>
includes/admin/settings/register-settings.php CHANGED
@@ -1,181 +1,181 @@
1
- <?php
2
- /**
3
- * Register Settings
4
- * @since 4.1
5
- */
6
-
7
- // Exit if accessed directly
8
- if ( !defined( 'ABSPATH' ) ) exit;
9
-
10
- /**
11
- * Get an option
12
- *
13
- * Looks to see if the specified setting exists, returns default if not
14
- *
15
- * @since 4.1
16
- * @global $widget_options Array of all the Widget Options
17
- * @return mixed
18
- */
19
- if( !function_exists( 'widgetopts_get_option' ) ):
20
- function widgetopts_get_option( $key = '', $default = false ) {
21
- global $widget_options;
22
-
23
- $value = ! empty( $widget_options[ $key ] ) ? $widget_options[ $key ] : $default;
24
- $value = apply_filters( 'widgetopts_get_option', $value, $key, $default );
25
-
26
- return apply_filters( 'widgetopts_get_option_' . $key, $value, $key, $default );
27
- }
28
- endif;
29
-
30
- /**
31
- * Update an option
32
- *
33
- * Updates an widgetopts setting value in both the db and the global variable.
34
- * Warning: Passing in an empty, false or null string value will remove
35
- * the key from the widget_options array.
36
- *
37
- * @since 4.1
38
- * @param string $key The Key to update
39
- * @param string|bool|int $value The value to set the key to
40
- * @global $widget_options Array of all the Widget Options
41
- * @return boolean True if updated, false if not.
42
- */
43
- if( !function_exists( 'widgetopts_update_option' ) ):
44
- function widgetopts_update_option( $key = '', $value = false ) {
45
-
46
- // If no key, exit
47
- if ( empty( $key ) ){
48
- return false;
49
- }
50
-
51
- if ( empty( $value ) ) {
52
- $remove_option = widgetopts_delete_option( $key );
53
- return $remove_option;
54
- }
55
-
56
- // First let's grab the current settings
57
- $options = get_option( 'widgetopts_settings' );
58
-
59
- // Let's let devs alter that value coming in
60
- $value = apply_filters( 'widgetopts_update_option', $value, $key );
61
-
62
- // Next let's try to update the value
63
- $options[ $key ] = $value;
64
-
65
- $did_update = update_option( 'widgetopts_settings', $options );
66
- // If it updated, let's update the global variable
67
- if ( $did_update ){
68
- global $widget_options;
69
- $widget_options[ $key ] = $value;
70
- }
71
- return $did_update;
72
- }
73
- endif;
74
-
75
- /**
76
- * Remove an option
77
- *
78
- * Removes widget options setting value in both the db and the global variable.
79
- *
80
- * @since 4.1
81
- * @param string $key The Key to delete
82
- * @global $widget_options Array of all the Widget Options
83
- * @return boolean True if removed, false if not.
84
- */
85
- if( !function_exists( 'widgetopts_delete_option' ) ):
86
- function widgetopts_delete_option( $key = '' ) {
87
- // If no key, exit
88
- if ( empty( $key ) ){
89
- return false;
90
- }
91
- // First let's grab the current settings
92
- $options = get_option( 'widgetopts_settings' );
93
-
94
- // Next let's try to update the value
95
- if( isset( $options[ $key ] ) ) {
96
- unset( $options[ $key ] );
97
- }
98
- $did_update = update_option( 'widgetopts_settings', $options );
99
-
100
- // If it updated, let's update the global variable
101
- if ( $did_update ){
102
- global $edd_options;
103
- $edd_options = $options;
104
- }
105
- return $did_update;
106
- }
107
- endif;
108
-
109
- /**
110
- * Get Settings
111
- *
112
- * Retrieves all plugin settings
113
- *
114
- * @since 4.1
115
- * @return array WIDGETOPTS settings
116
- */
117
- if( !function_exists( 'widgetopts_get_settings' ) ):
118
- function widgetopts_get_settings() {
119
- if (is_multisite()) {
120
- $settings = get_blog_option(get_current_blog_id(), 'widgetopts_settings');
121
- } else {
122
- $settings = get_option( 'widgetopts_settings' );
123
- }
124
-
125
- if( empty( $settings ) ) {
126
-
127
- $opts_settings = get_option( 'widgetopts_tabmodule-settings' );
128
- //fallback to prevent error
129
- if( is_serialized( $opts_settings ) ){
130
- $opts_settings = maybe_unserialize( $opts_settings );
131
- }
132
-
133
- // Update old settings with new single option
134
- $settings = !empty( $opts_settings ) ? $opts_settings : array();
135
- $visibility = array( 'visibility' => get_option( 'widgetopts_tabmodule-visibility' ) );
136
- $devices = array( 'devices' => get_option( 'widgetopts_tabmodule-devices' ) );
137
- $alignment = array( 'alignment' => get_option( 'widgetopts_tabmodule-alignment' ) );
138
- $hide_title = array( 'hide_title' => get_option( 'widgetopts_tabmodule-hide_title' ) );
139
- $classes = array( 'classes' => get_option( 'widgetopts_tabmodule-classes' ) );
140
- $logic = array( 'logic' => get_option( 'widgetopts_tabmodule-logic' ) );
141
- $siteorigin = array( 'siteorigin' => get_option( 'widgetopts_tabmodule-siteorigin' ) );
142
- $search = array( 'search' => get_option( 'widgetopts_tabmodule-search' ) );
143
- $move = array( 'move' => get_option( 'widgetopts_tabmodule-move' ) );
144
- $elementor = array( 'elementor' => get_option( 'widgetopts_tabmodule-elementor' ) );
145
- $widget_area = array( 'widget_area' => get_option( 'widgetopts_tabmodule-widget_area' ) );
146
- $import_export = array( 'import_export' => get_option( 'widgetopts_tabmodule-import_export' ) );
147
- $beaver = array( 'beaver' => get_option( 'widgetopts_tabmodule-beaver' ) );
148
- $acf = array( 'acf' => get_option( 'widgetopts_tabmodule-acf' ) );
149
- $state = array( 'state' => get_option( 'widgetopts_tabmodule-state' ) );
150
-
151
- /*
152
- * Available only on Extended version
153
- */
154
- // $columns = array( 'columns' => get_option( 'widgetopts_tabmodule-columns' ) );
155
- // $dates = array( 'dates' => get_option( 'widgetopts_tabmodule-dates' ) );
156
- // $styling = array( 'styling' => get_option( 'widgetopts_tabmodule-styling' ) );
157
- // $roles = array( 'roles' => get_option( 'widgetopts_tabmodule-roles' ) );
158
- // $links = array( 'links' => get_option( 'widgetopts_tabmodule-links' ) );
159
- // $fixed = array( 'fixed' => get_option( 'widgetopts_tabmodule-fixed' ) );
160
- // $taxonomies = array( 'taxonomies' => get_option( 'widgetopts_tabmodule-taxonomies' ) );
161
- // $animation = array( 'animation' => get_option( 'widgetopts_tabmodule-animation' ) );
162
- // $shortcodes = array( 'shortcodes' => get_option( 'widgetopts_tabmodule-shortcodes' ) );
163
- // $cache = array( 'cache' => get_option( 'widgetopts_tabmodule-cache' ) );
164
- // $disable_widgets = array( 'disable_widgets' => get_option( 'widgetopts_tabmodule-disable_widgets' ) );
165
- // $permission = array( 'permission' => get_option( 'widgetopts_tabmodule-permission' ) );
166
-
167
- $settings = array_merge( array( 'settings' => $settings ), $visibility, $devices, $alignment, $hide_title, $classes, $logic, $siteorigin, $search, $move, $elementor, $widget_area, $import_export, $beaver, $acf, $state );
168
-
169
- // Let's let devs alter that value coming in
170
- $value = apply_filters( 'widgetopts_update_settings', $settings );
171
-
172
- update_option( 'widgetopts_settings', $settings );
173
- }
174
-
175
- $default = array('settings' => array(), 'visibility' => '', 'devices' => '', 'alignment' => '', 'columns' => '', 'dates' => '', 'styling' => '', 'roles' => '', 'hide_title' => '', 'classes' => '', 'logic' => '', 'links' => '', 'fixed' => '', 'taxonomies' => '', 'animation' => '', 'shortcodes' => '', 'cache' => '', 'siteorigin' => '', 'search' => '', 'disable_widgets' => '', 'permission' => '', 'move' => '', 'clone' => '', 'elementor' => '', 'widget_area' => '', 'import_export' => '', 'urls' => '', 'beaver' => '', 'acf' => '', 'state' => '', 'sliding' => '');
176
- $settings = shortcode_atts($default, $settings);
177
-
178
- return apply_filters( 'widgetopts_get_settings', $settings );
179
- }
180
- endif;
181
- ?>
1
+ <?php
2
+ /**
3
+ * Register Settings
4
+ * @since 4.1
5
+ */
6
+
7
+ // Exit if accessed directly
8
+ if ( !defined( 'ABSPATH' ) ) exit;
9
+
10
+ /**
11
+ * Get an option
12
+ *
13
+ * Looks to see if the specified setting exists, returns default if not
14
+ *
15
+ * @since 4.1
16
+ * @global $widget_options Array of all the Widget Options
17
+ * @return mixed
18
+ */
19
+ if( !function_exists( 'widgetopts_get_option' ) ):
20
+ function widgetopts_get_option( $key = '', $default = false ) {
21
+ global $widget_options;
22
+
23
+ $value = ! empty( $widget_options[ $key ] ) ? $widget_options[ $key ] : $default;
24
+ $value = apply_filters( 'widgetopts_get_option', $value, $key, $default );
25
+
26
+ return apply_filters( 'widgetopts_get_option_' . $key, $value, $key, $default );
27
+ }
28
+ endif;
29
+
30
+ /**
31
+ * Update an option
32
+ *
33
+ * Updates an widgetopts setting value in both the db and the global variable.
34
+ * Warning: Passing in an empty, false or null string value will remove
35
+ * the key from the widget_options array.
36
+ *
37
+ * @since 4.1
38
+ * @param string $key The Key to update
39
+ * @param string|bool|int $value The value to set the key to
40
+ * @global $widget_options Array of all the Widget Options
41
+ * @return boolean True if updated, false if not.
42
+ */
43
+ if( !function_exists( 'widgetopts_update_option' ) ):
44
+ function widgetopts_update_option( $key = '', $value = false ) {
45
+
46
+ // If no key, exit
47
+ if ( empty( $key ) ){
48
+ return false;
49
+ }
50
+
51
+ if ( empty( $value ) ) {
52
+ $remove_option = widgetopts_delete_option( $key );
53
+ return $remove_option;
54
+ }
55
+
56
+ // First let's grab the current settings
57
+ $options = get_option( 'widgetopts_settings' );
58
+
59
+ // Let's let devs alter that value coming in
60
+ $value = apply_filters( 'widgetopts_update_option', $value, $key );
61
+
62
+ // Next let's try to update the value
63
+ $options[ $key ] = $value;
64
+
65
+ $did_update = update_option( 'widgetopts_settings', $options );
66
+ // If it updated, let's update the global variable
67
+ if ( $did_update ){
68
+ global $widget_options;
69
+ $widget_options[ $key ] = $value;
70
+ }
71
+ return $did_update;
72
+ }
73
+ endif;
74
+
75
+ /**
76
+ * Remove an option
77
+ *
78
+ * Removes widget options setting value in both the db and the global variable.
79
+ *
80
+ * @since 4.1
81
+ * @param string $key The Key to delete
82
+ * @global $widget_options Array of all the Widget Options
83
+ * @return boolean True if removed, false if not.
84
+ */
85
+ if( !function_exists( 'widgetopts_delete_option' ) ):
86
+ function widgetopts_delete_option( $key = '' ) {
87
+ // If no key, exit
88
+ if ( empty( $key ) ){
89
+ return false;
90
+ }
91
+ // First let's grab the current settings
92
+ $options = get_option( 'widgetopts_settings' );
93
+
94
+ // Next let's try to update the value
95
+ if( isset( $options[ $key ] ) ) {
96
+ unset( $options[ $key ] );
97
+ }
98
+ $did_update = update_option( 'widgetopts_settings', $options );
99
+
100
+ // If it updated, let's update the global variable
101
+ if ( $did_update ){
102
+ global $edd_options;
103
+ $edd_options = $options;
104
+ }
105
+ return $did_update;
106
+ }
107
+ endif;
108
+
109
+ /**
110
+ * Get Settings
111
+ *
112
+ * Retrieves all plugin settings
113
+ *
114
+ * @since 4.1
115
+ * @return array WIDGETOPTS settings
116
+ */
117
+ if( !function_exists( 'widgetopts_get_settings' ) ):
118
+ function widgetopts_get_settings() {
119
+ if (is_multisite()) {
120
+ $settings = get_blog_option(get_current_blog_id(), 'widgetopts_settings');
121
+ } else {
122
+ $settings = get_option( 'widgetopts_settings' );
123
+ }
124
+
125
+ if( empty( $settings ) ) {
126
+
127
+ $opts_settings = get_option( 'widgetopts_tabmodule-settings' );
128
+ //fallback to prevent error
129
+ if( is_serialized( $opts_settings ) ){
130
+ $opts_settings = maybe_unserialize( $opts_settings );
131
+ }
132
+
133
+ // Update old settings with new single option
134
+ $settings = !empty( $opts_settings ) ? $opts_settings : array();
135
+ $visibility = array( 'visibility' => get_option( 'widgetopts_tabmodule-visibility' ) );
136
+ $devices = array( 'devices' => get_option( 'widgetopts_tabmodule-devices' ) );
137
+ $alignment = array( 'alignment' => get_option( 'widgetopts_tabmodule-alignment' ) );
138
+ $hide_title = array( 'hide_title' => get_option( 'widgetopts_tabmodule-hide_title' ) );
139
+ $classes = array( 'classes' => get_option( 'widgetopts_tabmodule-classes' ) );
140
+ $logic = array( 'logic' => get_option( 'widgetopts_tabmodule-logic' ) );
141
+ $siteorigin = array( 'siteorigin' => get_option( 'widgetopts_tabmodule-siteorigin' ) );
142
+ $search = array( 'search' => get_option( 'widgetopts_tabmodule-search' ) );
143
+ $move = array( 'move' => get_option( 'widgetopts_tabmodule-move' ) );
144
+ $elementor = array( 'elementor' => get_option( 'widgetopts_tabmodule-elementor' ) );
145
+ $widget_area = array( 'widget_area' => get_option( 'widgetopts_tabmodule-widget_area' ) );
146
+ $import_export = array( 'import_export' => get_option( 'widgetopts_tabmodule-import_export' ) );
147
+ $beaver = array( 'beaver' => get_option( 'widgetopts_tabmodule-beaver' ) );
148
+ $acf = array( 'acf' => get_option( 'widgetopts_tabmodule-acf' ) );
149
+ $state = array( 'state' => get_option( 'widgetopts_tabmodule-state' ) );
150
+ $classic_widgets_screen = array( 'state' => get_option( 'widgetopts_tabmodule-classic_widgets_screen' ) );
151
+ /*
152
+ * Available only on Extended version
153
+ */
154
+ // $columns = array( 'columns' => get_option( 'widgetopts_tabmodule-columns' ) );
155
+ // $dates = array( 'dates' => get_option( 'widgetopts_tabmodule-dates' ) );
156
+ // $styling = array( 'styling' => get_option( 'widgetopts_tabmodule-styling' ) );
157
+ // $roles = array( 'roles' => get_option( 'widgetopts_tabmodule-roles' ) );
158
+ // $links = array( 'links' => get_option( 'widgetopts_tabmodule-links' ) );
159
+ // $fixed = array( 'fixed' => get_option( 'widgetopts_tabmodule-fixed' ) );
160
+ // $taxonomies = array( 'taxonomies' => get_option( 'widgetopts_tabmodule-taxonomies' ) );
161
+ // $animation = array( 'animation' => get_option( 'widgetopts_tabmodule-animation' ) );
162
+ // $shortcodes = array( 'shortcodes' => get_option( 'widgetopts_tabmodule-shortcodes' ) );
163
+ // $cache = array( 'cache' => get_option( 'widgetopts_tabmodule-cache' ) );
164
+ // $disable_widgets = array( 'disable_widgets' => get_option( 'widgetopts_tabmodule-disable_widgets' ) );
165
+ // $permission = array( 'permission' => get_option( 'widgetopts_tabmodule-permission' ) );
166
+
167
+ $settings = array_merge( array( 'settings' => $settings ), $visibility, $devices, $alignment, $hide_title, $classes, $logic, $siteorigin, $search, $move, $elementor, $widget_area, $import_export, $beaver, $acf, $state,$classic_widgets_screen );
168
+
169
+ // Let's let devs alter that value coming in
170
+ $value = apply_filters( 'widgetopts_update_settings', $settings );
171
+
172
+ update_option( 'widgetopts_settings', $settings );
173
+ }
174
+
175
+ $default = array('settings' => array(), 'visibility' => '', 'devices' => '', 'alignment' => '', 'columns' => '', 'dates' => '', 'styling' => '', 'roles' => '', 'hide_title' => '', 'classes' => '', 'logic' => '', 'links' => '', 'fixed' => '', 'taxonomies' => '', 'animation' => '', 'shortcodes' => '', 'cache' => '', 'siteorigin' => '', 'search' => '', 'disable_widgets' => '', 'permission' => '', 'move' => '', 'clone' => '', 'elementor' => '', 'widget_area' => '', 'import_export' => '', 'urls' => '', 'beaver' => '', 'acf' => '', 'state' => '', 'sliding' => '','classic_widgets_screen'=>'activate');
176
+ $settings = shortcode_atts($default, $settings);
177
+
178
+ return apply_filters( 'widgetopts_get_settings', $settings );
179
+ }
180
+ endif;
181
+ ?>
includes/install.php CHANGED
@@ -58,6 +58,7 @@ if( !function_exists( 'widgetopts_register_defaults' ) ){
58
  add_option( 'widgetopts_tabmodule-classes', 'activate' );
59
  add_option( 'widgetopts_tabmodule-logic', 'activate' );
60
  add_option( 'widgetopts_tabmodule-state', 'activate' );
 
61
  //add free version settings
62
  $defaults = array(
63
  'visibility' => array(
58
  add_option( 'widgetopts_tabmodule-classes', 'activate' );
59
  add_option( 'widgetopts_tabmodule-logic', 'activate' );
60
  add_option( 'widgetopts_tabmodule-state', 'activate' );
61
+ add_option( 'widgetopts_tabmodule-classic_widgets_screen', 'activate' );
62
  //add free version settings
63
  $defaults = array(
64
  'visibility' => array(
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Widget Options
4
  * Plugin URI: https://widget-options.com/
5
  * Description: Additional Widget options for better widget control. Get <strong><a href="http://widget-options.com/" target="_blank" >Extended Widget Options for WordPress</a></strong> for complete widget controls. Thanks!
6
- * Version: 3.7.8
7
  * Author: Widget Options Team
8
  * Author URI: https://widget-options.com/
9
  * Text Domain: widget-options
@@ -52,10 +52,23 @@ final class WP_Widget_Options {
52
 
53
  self::$instance->includes();
54
  // self::$instance->roles = new WIDGETOPTS_Roles();
 
55
  }
56
  return self::$instance;
57
  }
58
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  /**
60
  * Setup plugin constants.
61
  *
@@ -72,7 +85,7 @@ final class WP_Widget_Options {
72
 
73
  // Plugin version.
74
  if ( ! defined( 'WIDGETOPTS_VERSION' ) ) {
75
- define( 'WIDGETOPTS_VERSION', '3.7.8' );
76
  }
77
 
78
  // Plugin Folder Path.
@@ -125,6 +138,7 @@ final class WP_Widget_Options {
125
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/transient.php';
126
 
127
  if( in_array( $pagenow, array( 'options-general.php' ) ) ){
 
128
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/visibility.php';
129
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/devices.php';
130
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/alignment.php';
3
  * Plugin Name: Widget Options
4
  * Plugin URI: https://widget-options.com/
5
  * Description: Additional Widget options for better widget control. Get <strong><a href="http://widget-options.com/" target="_blank" >Extended Widget Options for WordPress</a></strong> for complete widget controls. Thanks!
6
+ * Version: 3.7.9
7
  * Author: Widget Options Team
8
  * Author URI: https://widget-options.com/
9
  * Text Domain: widget-options
52
 
53
  self::$instance->includes();
54
  // self::$instance->roles = new WIDGETOPTS_Roles();
55
+ add_filter( 'use_widgets_block_editor', array(self::$instance,'widget_options_use_widgets_block_editor') );
56
  }
57
  return self::$instance;
58
  }
59
 
60
+ /**
61
+ * REVERT classic widgets screen
62
+ */
63
+ public function widget_options_use_widgets_block_editor( $use_widgets_block_editor ) {
64
+ global $widget_options;
65
+ if(!empty($widget_options['classic_widgets_screen']) && $widget_options['classic_widgets_screen'] == 'activate' ){
66
+ return false;
67
+ }else{
68
+ return true;
69
+ }
70
+ }
71
+
72
  /**
73
  * Setup plugin constants.
74
  *
85
 
86
  // Plugin version.
87
  if ( ! defined( 'WIDGETOPTS_VERSION' ) ) {
88
+ define( 'WIDGETOPTS_VERSION', '3.7.9' );
89
  }
90
 
91
  // Plugin Folder Path.
138
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/transient.php';
139
 
140
  if( in_array( $pagenow, array( 'options-general.php' ) ) ){
141
+ require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/classic-widgets-screen.php';
142
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/visibility.php';
143
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/devices.php';
144
  require_once WIDGETOPTS_PLUGIN_DIR . 'includes/admin/settings/modules/alignment.php';
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === Widget Options The #1 Widget Control Plugin ===
2
- Contributors: marketingfire, phpbits, flowdeedee
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMKC2SLPTULP8
4
  Tags: widgets, restrict widgets, display widgets, widget logic, hide widgets, hide widget, sidebar, widget content, display widget, widget options, widget option, widget, widget css, CSS, widget classes, widget styling, widget ID, widget custom class, widget visibility, widget ninja, jetpack visibility, siteorigin, siteorigin pagebuilder, pagebuilder by siteorigin
5
  Requires at least: 4.0
6
- Tested up to: 5.7
7
  Requires PHP: 5.6
8
- Stable tag: 3.7.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -154,6 +154,11 @@ Widget Options is a featured pack fully lightweight plugin. Using Query Monitor
154
 
155
  == Changelog ==
156
 
 
 
 
 
 
157
  = 3.7.8 =
158
  * Compatible with Latest WordPress.
159
  * Updated dependency security vulnerability.
1
+ === Widget Options - Add Context To WordPress Widgets ===
2
+ Contributors: marketingfire, phpbits, flowdee
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMKC2SLPTULP8
4
  Tags: widgets, restrict widgets, display widgets, widget logic, hide widgets, hide widget, sidebar, widget content, display widget, widget options, widget option, widget, widget css, CSS, widget classes, widget styling, widget ID, widget custom class, widget visibility, widget ninja, jetpack visibility, siteorigin, siteorigin pagebuilder, pagebuilder by siteorigin
5
  Requires at least: 4.0
6
+ Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 3.7.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
154
 
155
  == Changelog ==
156
 
157
+ = 3.7.9 =
158
+ * Compatible with Latest WordPress.
159
+ * Added option to revert Classic Widgets Screen.
160
+ * Fixed admin notices.
161
+
162
  = 3.7.8 =
163
  * Compatible with Latest WordPress.
164
  * Updated dependency security vulnerability.