WP_Block_Patterns_Registry::get_instance() WordPress Method
The WP_Block_Patterns_Registry::get_instance() method is used to retrieve the global block patterns registry instance.
WP_Block_Patterns_Registry::get_instance() #
Utility method to retrieve the main instance of the class.
Description
The instance will be created if it does not exist yet.
Return
(WP_Block_Patterns_Registry) The main instance.
Source
File: wp-includes/class-wp-block-patterns-registry.php
public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |