WP_Connector_Registry::set_instance( WP_Connector_Registry $registry )

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Sets the main instance of the registry class.

Description

Called by _wp_connectors_init() during the init action. Must not be called outside of that context.

See also

Parameters

$registryWP_Connector_Registryrequired
The registry instance.

Source

public static function set_instance( WP_Connector_Registry $registry ): void {
	if ( ! doing_action( 'init' ) ) {
		_doing_it_wrong(
			__METHOD__,
			__( 'The connector registry instance must be set during the <code>init</code> action.' ),
			'7.0.0'
		);
		return;
	}

	self::$instance = $registry;
}

Changelog

VersionDescription
7.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.