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_Type_Registry The main instance.Source
public static function get_instance() {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
Related
Used by | Description |
---|---|
get_hooked_blocks()wp-includes/blocks.php | Retrieves block types hooked into the given block, grouped by anchor block type and the relative position. |
WP_Navigation_Fallback::get_default_fallback_blocks()wp-includes/class-wp-navigation-fallback.php | Gets the rendered markup for the default fallback blocks. |
WP_Theme_JSON_Resolver::get_block_data()wp-includes/class-wp-theme-json-resolver.php | Gets the styles for blocks from the block.json file. |
WP_Theme_JSON_Resolver::has_same_registered_blocks()wp-includes/class-wp-theme-json-resolver.php | Checks whether the registered blocks were already processed for this origin. |
_wp_get_iframed_editor_assets()wp-includes/block-editor.php | Collect the block editor assets that need to be loaded into the editor’s iframe. |
WP_REST_Widget_Types_Controller::render_legacy_widget_preview_iframe()wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php | Renders a page containing a preview of the requested Legacy Widget block. |
WP_Block_Supports::apply_block_supports()wp-includes/class-wp-block-supports.php | Generates an array of HTML attributes, such as classes, by applying to the given block all of the features that the block supports. |
WP_Block_Supports::register_attributes()wp-includes/class-wp-block-supports.php | Registers the block attributes required by the different block supports. |
WP_Block::__construct()wp-includes/class-wp-block.php | Constructor. |
WP_REST_Block_Types_Controller::__construct()wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php | Constructor. |
WP_Block_List::__construct()wp-includes/class-wp-block-list.php | Constructor. |
register_block_type_from_metadata()wp-includes/blocks.php | Registers a block type from the metadata stored in the |
WP_REST_Block_Renderer_Controller::register_routes()wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php | Registers the necessary REST API routes, one for each dynamic block. |
WP_REST_Block_Renderer_Controller::get_item()wp-includes/rest-api/endpoints/class-wp-rest-block-renderer-controller.php | Returns block output from block’s registered render_callback. |
wp_enqueue_registered_block_scripts_and_styles()wp-includes/script-loader.php | Enqueues registered block scripts and styles, depending on current rendered context (only enqueuing editor scripts while in context of the editor). |
register_block_type()wp-includes/blocks.php | Registers a block type. The recommended way is to register a block type using the metadata stored in the |
unregister_block_type()wp-includes/blocks.php | Unregisters a block type. |
get_dynamic_block_names()wp-includes/blocks.php | Returns an array of the names of all registered dynamic block types. |
get_block_editor_server_block_settings()wp-admin/includes/post.php | Prepares server-registered blocks for the block editor. |
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.