Skip to content

Commit 3424918

Browse files
committed
Fix params initialization for several widgets of same plugin
1 parent ec903fb commit 3424918

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

inc/plugins/_plugin.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4015,6 +4015,14 @@ function get_edit_settings_url()
40154015
*/
40164016
function init_widget_params( $params, $default_params = array() )
40174017
{
4018+
if( isset( $params['wi_ID'] ) &&
4019+
( ! isset( $this->current_widget_ID ) || $this->current_widget_ID != $params['wi_ID'] ) )
4020+
{ // Reset widget params on switch plugin to display next widget:
4021+
$this->widget_params = NULL;
4022+
// Store current widget ID to know when next widget is started to display:
4023+
$this->current_widget_ID = $params['wi_ID'];
4024+
}
4025+
40184026
if( ! isset( $this->widget_params ) )
40194027
{ // Don't initialize params twice:
40204028
$this->widget_params = array_merge( $default_params, $params );

0 commit comments

Comments
 (0)