Widget Logic - Version 5.7.4

Version Description

Fixed the "Warning: Attempt to assign property of non-object" bug. https://wordpress.org/support/topic/latest-update-seems-break-my-installation/

Download this release

Release Info

Developer wpchefgadget
Plugin Icon 128x128 Widget Logic
Version 5.7.4
Comparing to
See all releases

Code changes from version 5.7.3 to 5.7.4

Files changed (2) hide show
  1. readme.txt +5 -1
  2. widget_logic.php +2 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.justgiving.com/widgetlogic_cancerresearchuk
4
  Tags: widget, admin, conditional tags, filter, context
5
  Requires at least: 3.0
6
  Tested up to: 4.7.4
7
- Stable tag: 5.7.3
8
  License: GPLv2 or later
9
 
10
  Widget Logic lets you control on which pages widgets appear using WP's conditional tags. It also adds a 'widget_content' filter.
@@ -119,6 +119,10 @@ Tighten up your definitions with PHPs 'logical AND' &&, for example:
119
 
120
  == Changelog ==
121
 
 
 
 
 
122
  = 5.7.3 =
123
  Fixed the issue when in some cases the plugin displayed user logic errors in the Widgets section and this didn't allow to save the widgets.
124
  https://wordpress.org/support/topic/an-error-has-occurred-please-reload-the-page-and-try-again-3/
4
  Tags: widget, admin, conditional tags, filter, context
5
  Requires at least: 3.0
6
  Tested up to: 4.7.4
7
+ Stable tag: 5.7.4
8
  License: GPLv2 or later
9
 
10
  Widget Logic lets you control on which pages widgets appear using WP's conditional tags. It also adds a 'widget_content' filter.
119
 
120
  == Changelog ==
121
 
122
+ = 5.7.4 =
123
+ Fixed the "Warning: Attempt to assign property of non-object" bug.
124
+ https://wordpress.org/support/topic/latest-update-seems-break-my-installation/
125
+
126
  = 5.7.3 =
127
  Fixed the issue when in some cases the plugin displayed user logic errors in the Widgets section and this didn't allow to save the widgets.
128
  https://wordpress.org/support/topic/an-error-has-occurred-please-reload-the-page-and-try-again-3/
widget_logic.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Widget Logic
4
  Plugin URI: http://wordpress.org/extend/plugins/widget-logic/
5
  Description: Control widgets with WP's conditional tags is_home etc
6
- Version: 5.7.3
7
  Author: wpchefgadget, alanft
8
 
9
  Text Domain: widget-logic
@@ -100,18 +100,15 @@ function widget_logic_sidebars_widgets_filter_add()
100
  // CALLED VIA 'widget_update_callback' FILTER (ajax update of a widget)
101
  function widget_logic_ajax_update_callback($instance, $new_instance, $old_instance, $this_widget)
102
  {
103
- //var_dump( $new_instance ); exit;
104
- $capt = $instance->_captured_options;
105
  global $wl_options;
106
  $widget_id=$this_widget->id;
107
  if ( isset($_POST[$widget_id.'-widget_logic']))
108
  {
109
  $wl_options[$widget_id]=trim($_POST[$widget_id.'-widget_logic']);
110
- //update_option('widget_logic', $wl_options);
111
 
112
  unset( $_POST[$widget_id.'-widget_logic'], $_REQUEST[$widget_id.'-widget_logic'] );
113
  }
114
- $instance->_captured_options = $capt;
115
  return $instance;
116
  }
117
 
3
  Plugin Name: Widget Logic
4
  Plugin URI: http://wordpress.org/extend/plugins/widget-logic/
5
  Description: Control widgets with WP's conditional tags is_home etc
6
+ Version: 5.7.4
7
  Author: wpchefgadget, alanft
8
 
9
  Text Domain: widget-logic
100
  // CALLED VIA 'widget_update_callback' FILTER (ajax update of a widget)
101
  function widget_logic_ajax_update_callback($instance, $new_instance, $old_instance, $this_widget)
102
  {
 
 
103
  global $wl_options;
104
  $widget_id=$this_widget->id;
105
  if ( isset($_POST[$widget_id.'-widget_logic']))
106
  {
107
  $wl_options[$widget_id]=trim($_POST[$widget_id.'-widget_logic']);
108
+ update_option('widget_logic', $wl_options);
109
 
110
  unset( $_POST[$widget_id.'-widget_logic'], $_REQUEST[$widget_id.'-widget_logic'] );
111
  }
 
112
  return $instance;
113
  }
114