Retrieves a registered connector.
Description
Do not use this method directly. Instead, use the wp_get_connector() function.
Triggers a _doing_it_wrong() notice if the connector is not registered.
Use is_registered() to check first when the connector may not exist.
See also
Parameters
$idstringrequired- The connector identifier.
Source
public function get_registered( string $id ): ?array {
if ( ! $this->is_registered( $id ) ) {
_doing_it_wrong(
__METHOD__,
/* translators: %s: Connector ID. */
sprintf( __( 'Connector "%s" not found.' ), esc_html( $id ) ),
'7.0.0'
);
return null;
}
return $this->registered_connectors[ $id ];
}
Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.