Version Description
(April 27, 2020) =
- Bugfix: Fix the Widget Context settings link in the widget controls after moving the settings under the "Appearance" menu for usability (closer to the widget settings).
- Feature: Add a link to the plugin settings in the plugin admin list, too.
Download this release
Release Info
Developer | kasparsd |
Plugin | Widget Context |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- readme.txt +7 -1
- src/WidgetContext.php +35 -2
- widget-context.php +1 -1
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: kasparsd, jamescollins
|
|
4 |
Tags: widget, widgets, widget context, context, logic, widget logic, visibility, widget visibility
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
Requires PHP: 5.6
|
10 |
Donate link: https://widgetcontext.com/pro
|
@@ -65,6 +65,12 @@ Specify URLs to ignore even if they're matched by any of the other context rules
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
= 1.3.1 (April 24, 2020) =
|
69 |
|
70 |
- Bugfix: better support for URL rules with query parameters.
|
4 |
Tags: widget, widgets, widget context, context, logic, widget logic, visibility, widget visibility
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 1.3.2
|
8 |
License: GPLv2 or later
|
9 |
Requires PHP: 5.6
|
10 |
Donate link: https://widgetcontext.com/pro
|
65 |
|
66 |
== Changelog ==
|
67 |
|
68 |
+
= 1.3.2 (April 27, 2020) =
|
69 |
+
|
70 |
+
- Bugfix: Fix the Widget Context settings link in the widget controls after moving the settings under the "Appearance" menu for usability (closer to the widget settings).
|
71 |
+
- Feature: Add a link to the plugin settings in the plugin admin list, too.
|
72 |
+
|
73 |
+
|
74 |
= 1.3.1 (April 24, 2020) =
|
75 |
|
76 |
- Bugfix: better support for URL rules with query parameters.
|
src/WidgetContext.php
CHANGED
@@ -96,8 +96,14 @@ class WidgetContext {
|
|
96 |
// Register admin settings menu
|
97 |
add_action( 'admin_menu', array( $this, 'widget_context_settings_menu' ) );
|
98 |
|
99 |
-
// Register admin settings
|
100 |
add_action( 'admin_init', array( $this, 'widget_context_settings_init' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
|
@@ -211,6 +217,33 @@ class WidgetContext {
|
|
211 |
return (bool) apply_filters( 'widget_context_pro_nag', true );
|
212 |
}
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
function set_widget_contexts_frontend() {
|
216 |
// Hide/show widgets for is_active_sidebar() to work
|
@@ -680,7 +713,7 @@ class WidgetContext {
|
|
680 |
if ( current_user_can( 'edit_theme_options' ) ) {
|
681 |
$settings_link[] = sprintf(
|
682 |
'<a href="%s" title="%s" target="_blank">%s</a>',
|
683 |
-
|
684 |
esc_attr__( 'Widget Context Settings', 'widget-context' ),
|
685 |
esc_html__( 'Settings', 'widget-context' )
|
686 |
);
|
96 |
// Register admin settings menu
|
97 |
add_action( 'admin_menu', array( $this, 'widget_context_settings_menu' ) );
|
98 |
|
99 |
+
// Register admin settings.
|
100 |
add_action( 'admin_init', array( $this, 'widget_context_settings_init' ) );
|
101 |
+
|
102 |
+
// Add quick links to the plugin list.
|
103 |
+
add_action(
|
104 |
+
'plugin_action_links_' . $this->plugin->basename(),
|
105 |
+
array( $this, 'plugin_action_links' )
|
106 |
+
);
|
107 |
}
|
108 |
|
109 |
|
217 |
return (bool) apply_filters( 'widget_context_pro_nag', true );
|
218 |
}
|
219 |
|
220 |
+
/**
|
221 |
+
* Add a link to the plugin settings in the plugin list.
|
222 |
+
*
|
223 |
+
* @return array List of links.
|
224 |
+
*/
|
225 |
+
public function plugin_action_links( $links ) {
|
226 |
+
$links[] = sprintf(
|
227 |
+
'<a href="%s">%s</a>',
|
228 |
+
esc_url( $this->plugin_settings_admin_url() ),
|
229 |
+
esc_html__( 'Settings', 'widget-context' )
|
230 |
+
);
|
231 |
+
|
232 |
+
$links[] = sprintf(
|
233 |
+
'<a href="%s">%s</a>',
|
234 |
+
esc_url( $this->customize_widgets_admin_url() ),
|
235 |
+
esc_html__( 'Configure Widgets', 'widget-context' )
|
236 |
+
);
|
237 |
+
|
238 |
+
if ( $this->pro_nag_enabled() ) {
|
239 |
+
$links[] = sprintf(
|
240 |
+
'<a href="%s" target="_blank">PRO 🚀</a>',
|
241 |
+
esc_url( 'https://widgetcontext.com/pro' )
|
242 |
+
);
|
243 |
+
}
|
244 |
+
|
245 |
+
return $links;
|
246 |
+
}
|
247 |
|
248 |
function set_widget_contexts_frontend() {
|
249 |
// Hide/show widgets for is_active_sidebar() to work
|
713 |
if ( current_user_can( 'edit_theme_options' ) ) {
|
714 |
$settings_link[] = sprintf(
|
715 |
'<a href="%s" title="%s" target="_blank">%s</a>',
|
716 |
+
esc_url( $this->plugin_settings_admin_url() ),
|
717 |
esc_attr__( 'Widget Context Settings', 'widget-context' ),
|
718 |
esc_html__( 'Settings', 'widget-context' )
|
719 |
);
|
widget-context.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Widget Context
|
4 |
* Plugin URI: https://widgetcontext.com
|
5 |
* Description: Show or hide widgets depending on the section of the site that is being viewed. Configure the widget visibility rules under the individual widget settings.
|
6 |
-
* Version: 1.3.
|
7 |
* Author: Kaspars Dambis
|
8 |
* Author URI: https://widgetcontext.com
|
9 |
* Text Domain: widget-context
|
3 |
* Plugin Name: Widget Context
|
4 |
* Plugin URI: https://widgetcontext.com
|
5 |
* Description: Show or hide widgets depending on the section of the site that is being viewed. Configure the widget visibility rules under the individual widget settings.
|
6 |
+
* Version: 1.3.2
|
7 |
* Author: Kaspars Dambis
|
8 |
* Author URI: https://widgetcontext.com
|
9 |
* Text Domain: widget-context
|