WP_Block_Patterns_Registry::get_instance()
Utility method to retrieve the main instance of the class.
The instance will be created if it does not exist yet.
{} It's a method of the class: WP_Block_Patterns_Registry{}
No Hooks.
Return
WP_Block_Patterns_Registry
. The main instance.
Usage
$result = WP_Block_Patterns_Registry::get_instance();
Changelog
Since 5.5.0 | Introduced. |
Code of WP_Block_Patterns_Registry::get_instance() WP Block Patterns Registry::get instance WP 6.0
public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; }