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
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.