WP_Block_Patterns_Registry::get_instance()public staticWP 5.5.0

Utility method to retrieve the main instance of the class.

The instance will be created if it does not exist yet.

Метод класса: WP_Block_Patterns_Registry{}

Хуков нет.


WP_Block_Patterns_Registry. The main instance.


$result = WP_Block_Patterns_Registry::get_instance();

Список изменений

С версии 5.5.0 Введена.

Код WP_Block_Patterns_Registry::get_instance() WP 6.5.5

public static function get_instance() {
	if ( null === self::$instance ) {
		self::$instance = new self();

	return self::$instance;