WP_Block_Pattern_Categories_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_Pattern_Categories_Registry) The main instance.

Source

File: wp-includes/class-wp-block-pattern-categories-registry.php

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

		return self::$instance;
	}

Changelog

Version Description
5.5.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_pattern_categories_registry/get_instance