Custom Sidebars – Dynamic Widget Area Manager - Version 3.31

Version Description

  • 2021-01-30
  • Minor fixes
  • Added action link to plugins table
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Custom Sidebars – Dynamic Widget Area Manager
Version 3.31
Comparing to
See all releases

Code changes from version 3.3 to 3.31

customsidebars.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Custom Sidebars
4
  * Plugin URI: https://wordpress.org/plugins/custom-sidebars/
5
  * Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
6
- * Version: 3.3
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Textdomain: custom-sidebars
@@ -50,7 +50,7 @@ function inc_sidebars_init() {
50
  'edit.php',
51
  'admin-ajax.php',
52
  'post.php',
53
- 'plugin-install.php',
54
  'post-new.php',
55
  'widgets.php',
56
  );
3
  * Plugin Name: Custom Sidebars
4
  * Plugin URI: https://wordpress.org/plugins/custom-sidebars/
5
  * Description: Allows you to create widgetized areas and custom sidebars. Replace whole sidebars or single widgets for specific posts and pages.
6
+ * Version: 3.31
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * Textdomain: custom-sidebars
50
  'edit.php',
51
  'admin-ajax.php',
52
  'post.php',
53
+ 'plugins.php',
54
  'post-new.php',
55
  'widgets.php',
56
  );
inc/class-custom-sidebars.php CHANGED
@@ -100,82 +100,7 @@ class CustomSidebars {
100
  add_action( 'admin_notices', array( $this, 'retirement_admin_notice' ) );
101
  add_action( 'wp_ajax_custom_sidebars_retirement_notice_dismiss', array( $this, 'dismiss_retirement_notice' ) );
102
  add_action( 'admin_enqueue_scripts', array( $this, 'dismiss_retirement_notice_js' ) );
103
-
104
- add_filter('install_plugins_table_api_args_featured', array($this, 'featured_plugins_tab'));
105
- }
106
-
107
- /**
108
- * Helper function for adding plugins to featured list
109
- *
110
- * @return array
111
- */
112
- function featured_plugins_tab($args)
113
- {
114
- add_filter('plugins_api_result', array($this, 'plugins_api_result'), 10, 3);
115
-
116
- return $args;
117
- } // featured_plugins_tab
118
-
119
-
120
- /**
121
- * Add single plugin to featured list
122
- *
123
- * @return object
124
- */
125
- function add_plugin_featured($plugin_slug, $res)
126
- {
127
- // check if plugin is already on the list
128
- if (!empty($res->plugins) && is_array($res->plugins)) {
129
- foreach ($res->plugins as $plugin) {
130
- if (is_object($plugin) && !empty($plugin->slug) && $plugin->slug == $plugin_slug) {
131
- return $res;
132
- }
133
- } // foreach
134
- }
135
-
136
- $plugin_info = get_transient('wf-plugin-info-' . $plugin_slug);
137
-
138
- if (!$plugin_info) {
139
- $plugin_info = plugins_api('plugin_information', array(
140
- 'slug' => $plugin_slug,
141
- 'is_ssl' => is_ssl(),
142
- 'fields' => array(
143
- 'banners' => true,
144
- 'reviews' => true,
145
- 'downloaded' => true,
146
- 'active_installs' => true,
147
- 'icons' => true,
148
- 'short_description' => true,
149
- )
150
- ));
151
- if (!is_wp_error($plugin_info)) {
152
- set_transient('wf-plugin-info-' . $plugin_slug, $plugin_info, DAY_IN_SECONDS * 7);
153
- }
154
- }
155
-
156
- if (!empty($res->plugins) && is_array($res->plugins) && $plugin_info && is_object($plugin_info)) {
157
- array_unshift($res->plugins, $plugin_info);
158
- }
159
-
160
- return $res;
161
- } // add_plugin_featured
162
-
163
-
164
- /**
165
- * Add plugins to featured plugins list
166
- *
167
- * @return object
168
- */
169
- function plugins_api_result($res, $action, $args)
170
- {
171
- remove_filter('plugins_api_result', array($this, 'plugins_api_result'), 10, 3);
172
-
173
- $res = $this->add_plugin_featured('eps-301-redirects', $res);
174
- $res = $this->add_plugin_featured('simple-author-box', $res);
175
- $res = $this->add_plugin_featured('sticky-menu-or-anything-on-scroll', $res);
176
-
177
- return $res;
178
- } // plugins_api_result
179
 
180
  /**
181
  * Add retirement admin notice
@@ -1183,19 +1108,22 @@ class CustomSidebars {
1183
  */
1184
  public function add_action_links( $actions, $plugin_file, $plugin_data, $context ) {
1185
  if ( current_user_can( 'edit_theme_options' ) ) {
1186
- $actions['widgets'] = sprintf(
1187
  '<a href="%s">%s</a>',
1188
  esc_url( admin_url( 'widgets.php' ) ),
1189
- __( 'Widgets', 'custom-sidebars' )
1190
- );
 
1191
  }
1192
- $url = 'https://wordpress.org/support/plugin/custom-sidebars';
1193
 
 
 
1194
  $actions['support'] = sprintf(
1195
  '<a href="%s">%s</a>',
1196
  esc_url( $url ),
1197
  __( 'Support', 'custom-sidebars' )
1198
- );
 
1199
  return $actions;
1200
  }
1201
 
100
  add_action( 'admin_notices', array( $this, 'retirement_admin_notice' ) );
101
  add_action( 'wp_ajax_custom_sidebars_retirement_notice_dismiss', array( $this, 'dismiss_retirement_notice' ) );
102
  add_action( 'admin_enqueue_scripts', array( $this, 'dismiss_retirement_notice_js' ) );
103
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
  /**
106
  * Add retirement admin notice
1108
  */
1109
  public function add_action_links( $actions, $plugin_file, $plugin_data, $context ) {
1110
  if ( current_user_can( 'edit_theme_options' ) ) {
1111
+ $widgets = sprintf(
1112
  '<a href="%s">%s</a>',
1113
  esc_url( admin_url( 'widgets.php' ) ),
1114
+ __( 'Configure Custom Sidebars', 'custom-sidebars' )
1115
+ );
1116
+ array_unshift($actions, $widgets);
1117
  }
 
1118
 
1119
+ /*
1120
+ $url = 'https://wordpress.org/support/plugin/custom-sidebars';
1121
  $actions['support'] = sprintf(
1122
  '<a href="%s">%s</a>',
1123
  esc_url( $url ),
1124
  __( 'Support', 'custom-sidebars' )
1125
+ );
1126
+ */
1127
  return $actions;
1128
  }
1129
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: WebFactory
3
  Tags: sidebar, widget, custom sidebar, dynamic widgets, manage sidebars, flexible layout, replace widgets, custom widget area, footer
4
  Requires at least: 4.6
5
- Tested up to: 5.6
6
- Stable tag: 3.3
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -16,6 +16,8 @@ Flexible sidebars for custom widget configurations on any page or post. Create c
16
 
17
  Make custom sidebar configurations and be able to choose what widgets display on each page or post of your site.
18
 
 
 
19
  = Display Different Sidebars on Pages and Posts =
20
 
21
  Custom Sidebars allows you to dynamically display custom widget configurations on any page, post, category, post type, or archive page.
@@ -98,6 +100,11 @@ Custom Sidebars has the same license as WordPress, so you can use it wherever yo
98
 
99
  == Changelog ==
100
 
 
 
 
 
 
101
  = 3.3 =
102
  * 2021-01-13
103
  * Minor fixes
2
  Contributors: WebFactory
3
  Tags: sidebar, widget, custom sidebar, dynamic widgets, manage sidebars, flexible layout, replace widgets, custom widget area, footer
4
  Requires at least: 4.6
5
+ Tested up to: 5.7
6
+ Stable tag: 3.31
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
16
 
17
  Make custom sidebar configurations and be able to choose what widgets display on each page or post of your site.
18
 
19
+ Need to make a **widget sticky** or fixed? Try our free <a href="https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/">WP Sticky Anything</a> plugin.
20
+
21
  = Display Different Sidebars on Pages and Posts =
22
 
23
  Custom Sidebars allows you to dynamically display custom widget configurations on any page, post, category, post type, or archive page.
100
 
101
  == Changelog ==
102
 
103
+ = 3.31 =
104
+ * 2021-01-30
105
+ * Minor fixes
106
+ * Added action link to plugins table
107
+
108
  = 3.3 =
109
  * 2021-01-13
110
  * Minor fixes