src/Register.php
public static function get_widget_instance( $widget_id ) {
		global $wp_registered_widgets;

		if ( ! isset( $wp_registered_widgets[ $widget_id ] ) ) {
			return false;
		}

		$model = $wp_registered_widgets[ $widget_id ]['callback'][0];

		if ( ! is_a( $model, 'Lean\Widgets\Models\AbstractWidget' ) ) {
			return false;
		}

		$key = $wp_registered_widgets[ $widget_id ]['params'][0]['number'];

		$model->_set( $key );

		return $model;
	}
public static function get_widget_instance( $widget_id ) {
		global $wp_registered_widgets;

		if ( ! isset( $wp_registered_widgets[ $widget_id ] ) ) {
			return false;
		}

		$model = $wp_registered_widgets[ $widget_id ]['callback'][0];

		if ( ! is_a( $model, 'Lean\Widgets\Models\AbstractWidget' ) ) {
			return false;
		}

		$key = $wp_registered_widgets[ $widget_id ]['params'][0]['number'];

		$model->_set( $key );

		return $model;
	}
public static function get_widget_instance ( $ widget_id ) { global $ wp_registered_widgets ; if ( ! isset ( $ wp_registered_widgets [ $ widget_id ] ) ) { return false ; } $ model = $ wp_registered_widgets [ $ widget_id ] [ 'callback' ] [ 0 ] ; if ( ! is_a ( $ model , 'Lean\Widgets\Models\AbstractWidget' ) ) { return false ; } $ key = $ wp_registered_widgets [ $ widget_id ] [ 'params' ] [ 0 ] [ 'number' ] ; $ model -> _set ( $ key ) ; return $ model ; }
Gets a specific instance of a widget

@param string $widget_id The widget id
@return AbstractWidget|bool
Gets a specific instance of a widget