PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-includes
<?php /** * Blocks API: WP_Block_Pattern_Categories_Registry class * * @package WordPress * @subpackage Blocks * @since 5.5.0 */ /** * Class used for interacting with block pattern categories. */ #[AllowDynamicProperties] final class WP_Block_Pattern_Categories_Registry { /** * Registered block pattern categories array. * * @since 5.5.0 * @var array[] */ private $registered_categories = array(); /** * Pattern categories registered outside the `init` action. * * @since 6.0.0 * @var array[] */ private $registered_categories_outside_init = array(); /** * Container for the main instance of the class. * * @since 5.5.0 * @var WP_Block_Pattern_Categories_Registry|null */ private static $instance = null; /** * Registers a pattern category. * * @since 5.5.0 * * @param string $category_name Pattern category name including namespace. * @param array $category_properties { * List of properties for the block pattern category. * * @type string $label Required. A human-readable label for the pattern category. * } * @return bool True if the pattern was registered with success and false otherwise. */ public function register( $category_name, $category_properties ) { if ( ! isset( $category_name ) || ! is_string( $category_name ) ) { _doing_it_wrong( __METHOD__, __( 'Block pattern category name must be a string.' ), '5.5.0' ); return false; } $category = array_merge( array( 'name' => $category_name ), $category_properties ); $this->registered_categories[ $category_name ] = $category; // If the category is registered inside an action other than `init`, store it // also to a dedicated array. Used to detect deprecated registrations inside // `admin_init` or `current_screen`. if ( current_action() && 'init' !== current_action() ) { $this->registered_categories_outside_init[ $category_name ] = $category; } return true; } /** * Unregisters a pattern category. * * @since 5.5.0 * * @param string $category_name Pattern category name including namespace. * @return bool True if the pattern was unregistered with success and false otherwise. */ public function unregister( $category_name ) { if ( ! $this->is_registered( $category_name ) ) { _doing_it_wrong( __METHOD__, /* translators: %s: Block pattern name. */ sprintf( __( 'Block pattern category "%s" not found.' ), $category_name ), '5.5.0' ); return false; } unset( $this->registered_categories[ $category_name ] ); unset( $this->registered_categories_outside_init[ $category_name ] ); return true; } /** * Retrieves an array containing the properties of a registered pattern category. * * @since 5.5.0 * * @param string $category_name Pattern category name including namespace. * @return array|null Registered pattern properties, or `null` if the pattern category is not registered. */ public function get_registered( $category_name ) { if ( ! $this->is_registered( $category_name ) ) { return null; } return $this->registered_categories[ $category_name ]; } /** * Retrieves all registered pattern categories. * * @since 5.5.0 * * @param bool $outside_init_only Return only categories registered outside the `init` action. * @return array[] Array of arrays containing the registered pattern categories properties. */ public function get_all_registered( $outside_init_only = false ) { return array_values( $outside_init_only ? $this->registered_categories_outside_init : $this->registered_categories ); } /** * Checks if a pattern category is registered. * * @since 5.5.0 * * @param string|null $category_name Pattern category name including namespace. * @return bool True if the pattern category is registered, false otherwise. */ public function is_registered( $category_name ) { return isset( $category_name, $this->registered_categories[ $category_name ] ); } /** * Utility method to retrieve the main instance of the class. * * The instance will be created if it does not exist yet. * * @since 5.5.0 * * @return WP_Block_Pattern_Categories_Registry The main instance. */ public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } } /** * Registers a new pattern category. * * @since 5.5.0 * * @param string $category_name Pattern category name including namespace. * @param array $category_properties List of properties for the block pattern. * See WP_Block_Pattern_Categories_Registry::register() for * accepted arguments. * @return bool True if the pattern category was registered with success and false otherwise. */ function register_block_pattern_category( $category_name, $category_properties ) { return WP_Block_Pattern_Categories_Registry::get_instance()->register( $category_name, $category_properties ); } /** * Unregisters a pattern category. * * @since 5.5.0 * * @param string $category_name Pattern category name including namespace. * @return bool True if the pattern category was unregistered with success and false otherwise. */ function unregister_block_pattern_category( $category_name ) { return WP_Block_Pattern_Categories_Registry::get_instance()->unregister( $category_name ); }
[+]
..
[-] error-protection.php
[edit]
[-] class-wp-http-streams.php
[edit]
[-] media.php
[edit]
[-] class-wp-phpmailer.php
[edit]
[-] class-wp-comment-query.php
[edit]
[+]
abilities-api
[-] class-wp-http-cookie.php
[edit]
[+]
Text
[-] class-wp-oembed-controller.php
[edit]
[-] ms-settings.php
[edit]
[-] capabilities.php
[edit]
[-] class-wp-application-passwords.php
[edit]
[-] revision.php
[edit]
[-] class-walker-category-dropdown.php
[edit]
[-] class-wp-http-requests-response.php
[edit]
[-] http.php
[edit]
[-] class-wp-tax-query.php
[edit]
[-] class-wp-http-requests-hooks.php
[edit]
[-] class-simplepie.php
[edit]
[-] pluggable-deprecated.php
[edit]
[-] compat-utf8.php
[edit]
[-] functions.wp-styles.php
[edit]
[-] class-wp-block-template.php
[edit]
[-] block-i18n.json
[edit]
[+]
l10n
[-] class-wp-editor.php
[edit]
[-] default-constants.php
[edit]
[+]
pomo
[-] class-wp-customize-section.php
[edit]
[-] style-engine.php
[edit]
[-] template-canvas.php
[edit]
[-] class-wp-plugin-dependencies.php
[edit]
[-] class-wp-image-editor-imagick.php
[edit]
[-] taxonomy.php
[edit]
[-] class-wp-user.php
[edit]
[-] class-wp-list-util.php
[edit]
[-] locale.php
[edit]
[-] class-wpdb.php
[edit]
[-] class-wp-term-query.php
[edit]
[-] ms-functions.php
[edit]
[-] class-http.php
[edit]
[-] embed.php
[edit]
[-] class-wp-paused-extensions-storage.php
[edit]
[-] class-wp-roles.php
[edit]
[-] formatting.php
[edit]
[-] class.wp-scripts.php
[edit]
[-] admin-bar.php
[edit]
[-] class-oembed.php
[edit]
[-] ms-blogs.php
[edit]
[-] session.php
[edit]
[-] class-phpmailer.php
[edit]
[+]
Requests
[-] l10n.php
[edit]
[-] class-wp-hook.php
[edit]
[-] ms-files.php
[edit]
[-] deprecated.php
[edit]
[-] class-wp-block-patterns-registry.php
[edit]
[-] class-wp-block-list.php
[edit]
[+]
IXR
[-] class-wp-term.php
[edit]
[-] script-loader.php
[edit]
[-] pluggable.php
[edit]
[-] block-patterns.php
[edit]
[-] media-template.php
[edit]
[+]
html-api
[-] class-wp-date-query.php
[edit]
[-] class-wp-fatal-error-handler.php
[edit]
[-] class-wp-navigation-fallback.php
[edit]
[-] rest-api.php
[edit]
[-] general-template.php
[edit]
[-] class-wp-locale.php
[edit]
[-] class-wp-locale-switcher.php
[edit]
[-] class-walker-category.php
[edit]
[-] class-snoopy.php
[edit]
[-] functions.wp-scripts.php
[edit]
[-] class-wp-http-response.php
[edit]
[-] kses.php
[edit]
[+]
PHPMailer
[-] sitemaps.php
[edit]
[-] comment-template.php
[edit]
[-] ms-load.php
[edit]
[-] class-smtp.php
[edit]
[+]
block-bindings
[-] utf8.php
[edit]
[-] speculative-loading.php
[edit]
[-] class-wp-theme-json-schema.php
[edit]
[-] class-wp-site.php
[edit]
[-] blocks.php
[edit]
[-] class-wp-rewrite.php
[edit]
[-] class-wp-customize-widgets.php
[edit]
[-] nav-menu.php
[edit]
[-] class-wp-block-bindings-registry.php
[edit]
[-] cache-compat.php
[edit]
[-] cache.php
[edit]
[-] class-wp-object-cache.php
[edit]
[-] https-migration.php
[edit]
[+]
assets
[-] wp-diff.php
[edit]
[-] atomlib.php
[edit]
[-] class-wp-recovery-mode.php
[edit]
[-] class-wp-matchesmapregex.php
[edit]
[-] rss.php
[edit]
[-] class-requests.php
[edit]
[-] class-wp-block-parser.php
[edit]
[-] feed-rss.php
[edit]
[-] class-wp-network-query.php
[edit]
[+]
js
[-] spl-autoload-compat.php
[edit]
[-] class-wp-simplepie-file.php
[edit]
[-] default-widgets.php
[edit]
[-] functions.php
[edit]
[-] query.php
[edit]
[+]
sodium_compat
[-] feed.php
[edit]
[-] feed-rss2.php
[edit]
[+]
block-supports
[-] default-filters.php
[edit]
[-] ms-network.php
[edit]
[-] class-wp-xmlrpc-server.php
[edit]
[-] class-walker-nav-menu.php
[edit]
[-] class-wp-admin-bar.php
[edit]
[-] abilities.php
[edit]
[-] post.php
[edit]
[-] class-wp-block-type.php
[edit]
[-] class-wp-taxonomy.php
[edit]
[-] class-wp-theme-json-data.php
[edit]
[-] class-phpass.php
[edit]
[-] theme.php
[edit]
[-] class-wp-image-editor.php
[edit]
[-] class-wp-duotone.php
[edit]
[-] class-wp-feed-cache-transient.php
[edit]
[-] global-styles-and-settings.php
[edit]
[-] class-json.php
[edit]
[-] class-wp-block-pattern-categories-registry.php
[edit]
[-] class.wp-dependencies.php
[edit]
[-] class-wp-customize-panel.php
[edit]
[-] plugin.php
[edit]
[-] class-wp-block.php
[edit]
[-] version.php
[edit]
[-] class-wp-customize-manager.php
[edit]
[-] class-wp-textdomain-registry.php
[edit]
[-] class-wp-block-styles-registry.php
[edit]
[-] class-wp-block-parser-frame.php
[edit]
[-] link-template.php
[edit]
[+]
fonts
[-] block-bindings.php
[edit]
[-] registration-functions.php
[edit]
[-] class-wp-customize-setting.php
[edit]
[-] class-wp-query.php
[edit]
[-] class-wp-classic-to-block-menu-converter.php
[edit]
[-] script-modules.php
[edit]
[-] class-wp-theme-json.php
[edit]
[-] post-thumbnail-template.php
[edit]
[-] ms-site.php
[edit]
[-] update.php
[edit]
[-] class-wp-block-templates-registry.php
[edit]
[-] feed-rss2-comments.php
[edit]
[-] registration.php
[edit]
[-] abilities-api.php
[edit]
[-] wp-db.php
[edit]
[-] comment.php
[edit]
[-] class-wp-http-proxy.php
[edit]
[+]
theme-compat
[-] vars.php
[edit]
[-] class-wp-http-ixr-client.php
[edit]
[+]
rest-api
[-] class-wp-user-query.php
[edit]
[+]
customize
[-] class-wp-customize-nav-menus.php
[edit]
[-] bookmark-template.php
[edit]
[-] class-wp-meta-query.php
[edit]
[-] class-wp-network.php
[edit]
[-] class-wp-theme-json-resolver.php
[edit]
[-] class-wp-session-tokens.php
[edit]
[-] theme-templates.php
[edit]
[-] https-detection.php
[edit]
[-] load.php
[edit]
[-] class-wp-script-modules.php
[edit]
[+]
SimplePie
[-] class-wp-feed-cache.php
[edit]
[-] theme.json
[edit]
[-] class-wp-http-curl.php
[edit]
[-] class-wp-ajax-response.php
[edit]
[-] class-wp-exception.php
[edit]
[+]
php-compat
[-] shortcodes.php
[edit]
[-] class-wp-widget.php
[edit]
[-] class-wp-role.php
[edit]
[-] ms-default-constants.php
[edit]
[-] class-wp-embed.php
[edit]
[-] feed-atom-comments.php
[edit]
[-] class-wp-block-processor.php
[edit]
[-] rss-functions.php
[edit]
[-] class-wp-recovery-mode-cookie-service.php
[edit]
[-] class-IXR.php
[edit]
[+]
images
[-] rewrite.php
[edit]
[-] template-loader.php
[edit]
[-] widgets.php
[edit]
[-] class-wp-simplepie-sanitize-kses.php
[edit]
[+]
certificates
[-] class-wp-url-pattern-prefixer.php
[edit]
[+]
style-engine
[-] category.php
[edit]
[-] class-wp-block-parser-block.php
[edit]
[-] class-wp-image-editor-gd.php
[edit]
[-] class-wp-post-type.php
[edit]
[-] class-wp-block-editor-context.php
[edit]
[-] class-walker-page-dropdown.php
[edit]
[-] bookmark.php
[edit]
[-] theme-i18n.json
[edit]
[-] class-walker-page.php
[edit]
[-] class-wp-user-request.php
[edit]
[-] embed-template.php
[edit]
[-] cron.php
[edit]
[-] class-wp-scripts.php
[edit]
[-] class-wp-styles.php
[edit]
[-] canonical.php
[edit]
[-] date.php
[edit]
[+]
css
[-] meta.php
[edit]
[+]
block-patterns
[-] class-wp-block-metadata-registry.php
[edit]
[-] template.php
[edit]
[-] class-wp-post.php
[edit]
[+]
interactivity-api
[-] class-wp-recovery-mode-key-service.php
[edit]
[+]
blocks
[-] class-feed.php
[edit]
[-] fonts.php
[edit]
[-] class-wp-block-type-registry.php
[edit]
[-] class-avif-info.php
[edit]
[-] class-wp-metadata-lazyloader.php
[edit]
[-] class-pop3.php
[edit]
[-] post-template.php
[edit]
[-] class-wp-speculation-rules.php
[edit]
[-] ms-deprecated.php
[edit]
[-] class-wp-dependencies.php
[edit]
[-] post-formats.php
[edit]
[-] author-template.php
[edit]
[-] compat.php
[edit]
[-] class-wp-error.php
[edit]
[-] feed-atom.php
[edit]
[-] category-template.php
[edit]
[-] class-wp-customize-control.php
[edit]
[-] block-editor.php
[edit]
[-] block-template.php
[edit]
[+]
widgets
[-] nav-menu-template.php
[edit]
[-] class-wp-oembed.php
[edit]
[-] class-wp-recovery-mode-email-service.php
[edit]
[-] class-wp-token-map.php
[edit]
[-] class-wp-dependency.php
[edit]
[-] feed-rdf.php
[edit]
[-] class-wp.php
[edit]
[-] class.wp-styles.php
[edit]
[-] theme-previews.php
[edit]
[-] class-wp-user-meta-session-tokens.php
[edit]
[-] class-wp-recovery-mode-link-service.php
[edit]
[-] class-wp-text-diff-renderer-inline.php
[edit]
[-] class-wp-site-query.php
[edit]
[-] robots-template.php
[edit]
[-] class-wp-http.php
[edit]
[-] user.php
[edit]
[-] class-wp-block-supports.php
[edit]
[-] class-wp-comment.php
[edit]
[-] block-template-utils.php
[edit]
[+]
sitemaps
[-] class-wp-widget-factory.php
[edit]
[+]
ID3
[-] class-wp-walker.php
[edit]
[-] option.php
[edit]
[-] class-wp-block-bindings-source.php
[edit]
[-] class-wp-text-diff-renderer-table.php
[edit]
[-] class-wp-http-encoding.php
[edit]
[-] class-walker-comment.php
[edit]
[-] ms-default-filters.php
[edit]
[-] class-wp-theme.php
[edit]