src/abstract-plugin.php
private static function set( $instance = false ) {
		// Make sure the plugin hasn't already been instantiated before.
		global $wp_plugins;
		if ( ! isset( $wp_plugins ) ) {
			$wp_plugins = new \stdClass();
		}
		// Get the fully qualified parent class name and instantiate an instance of it.
		$called_class = get_called_class();
		$plugin_name  = strtolower( $called_class );
		if ( empty( $instance ) || ! is_a( $instance, $called_class ) ) {
			$wp_plugins->$plugin_name = new $called_class();
		} else {
			$wp_plugins->$plugin_name = $instance;
		}
	}
private static function set( $instance = false ) {
		// Make sure the plugin hasn't already been instantiated before.
		global $wp_plugins;
		if ( ! isset( $wp_plugins ) ) {
			$wp_plugins = new \stdClass();
		}
		// Get the fully qualified parent class name and instantiate an instance of it.
		$called_class = get_called_class();
		$plugin_name  = strtolower( $called_class );
		if ( empty( $instance ) || ! is_a( $instance, $called_class ) ) {
			$wp_plugins->$plugin_name = new $called_class();
		} else {
			$wp_plugins->$plugin_name = $instance;
		}
	}
private static function set ( $ instance = false ) { // Make sure the plugin hasn't already been instantiated before. global $ wp_plugins ; if ( ! isset ( $ wp_plugins ) ) { $ wp_plugins = new \ stdClass ( ) ; } // Get the fully qualified parent class name and instantiate an instance of it. $ called_class = get_called_class ( ) ; $ plugin_name = strtolower ( $ called_class ) ; if ( empty ( $ instance ) || ! is_a ( $ instance , $ called_class ) ) { $ wp_plugins -> $ plugin_name = new $ called_class ( ) ; } else { $ wp_plugins -> $ plugin_name = $ instance ; } }
Used to setup the instance of the class and place in wp_plugins collection.

@param bool|Abstract_Plugin|mixed $instance Contains object representing the plugin.
Used to setup the instance of the class and place in wp_plugins collection .