diff --git a/core/Widget/Widget.php b/core/Widget/Widget.php index 3533e3f6..67ec00c9 100644 --- a/core/Widget/Widget.php +++ b/core/Widget/Widget.php @@ -12,6 +12,7 @@ */ abstract class Widget extends \WP_Widget { public static $registered_widget_ids = array(); + private $registered_field_names = array(); /** * Widget Datastore @@ -223,14 +224,12 @@ public function add_fields( $fields ) { * @return boolean */ public function register_field_name( $name ) { - static $registered_field_names = array(); - - if ( in_array( $name, $registered_field_names ) ) { + if ( in_array( $name, $this->registered_field_names ) ) { Incorrect_Syntax_Exception::raise( 'Field name "' . $name . '" already registered' ); return false; } - $registered_field_names[] = $name; + $this->registered_field_names[] = $name; return true; }