PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-includes
<?php /** * Blocks API: WP_Block_Patterns_Registry class * * @package WordPress * @subpackage Blocks * @since 5.5.0 */ /** * Class used for interacting with patterns. * * @since 5.5.0 */ final class WP_Block_Patterns_Registry { /** * Registered patterns array. * * @since 5.5.0 * @var array */ private $registered_patterns = array(); /** * Container for the main instance of the class. * * @since 5.5.0 * @var WP_Block_Patterns_Registry|null */ private static $instance = null; /** * Registers a pattern. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @param array $pattern_properties Array containing the properties of the pattern: title, * content, description, viewportWidth, categories, keywords. * @return bool True if the pattern was registered with success and false otherwise. */ public function register( $pattern_name, $pattern_properties ) { if ( ! isset( $pattern_name ) || ! is_string( $pattern_name ) ) { _doing_it_wrong( __METHOD__, __( 'Pattern name must be a string.' ), '5.5.0' ); return false; } if ( ! isset( $pattern_properties['title'] ) || ! is_string( $pattern_properties['title'] ) ) { _doing_it_wrong( __METHOD__, __( 'Pattern title must be a string.' ), '5.5.0' ); return false; } if ( ! isset( $pattern_properties['content'] ) || ! is_string( $pattern_properties['content'] ) ) { _doing_it_wrong( __METHOD__, __( 'Pattern content must be a string.' ), '5.5.0' ); return false; } $this->registered_patterns[ $pattern_name ] = array_merge( $pattern_properties, array( 'name' => $pattern_name ) ); return true; } /** * Unregisters a pattern. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @return bool True if the pattern was unregistered with success and false otherwise. */ public function unregister( $pattern_name ) { if ( ! $this->is_registered( $pattern_name ) ) { _doing_it_wrong( __METHOD__, /* translators: %s: Pattern name. */ sprintf( __( 'Pattern "%s" not found.' ), $pattern_name ), '5.5.0' ); return false; } unset( $this->registered_patterns[ $pattern_name ] ); return true; } /** * Retrieves an array containing the properties of a registered pattern. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @return array Registered pattern properties. */ public function get_registered( $pattern_name ) { if ( ! $this->is_registered( $pattern_name ) ) { return null; } return $this->registered_patterns[ $pattern_name ]; } /** * Retrieves all registered patterns. * * @since 5.5.0 * * @return array Array of arrays containing the registered patterns properties, * and per style. */ public function get_all_registered() { return array_values( $this->registered_patterns ); } /** * Checks if a pattern is registered. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @return bool True if the pattern is registered, false otherwise. */ public function is_registered( $pattern_name ) { return isset( $this->registered_patterns[ $pattern_name ] ); } public function __wakeup() { if ( ! $this->registered_patterns ) { return; } if ( ! is_array( $this->registered_patterns ) ) { throw new UnexpectedValueException(); } foreach ( $this->registered_patterns as $value ) { if ( ! is_array( $value ) ) { throw new UnexpectedValueException(); } } $this->registered_patterns_outside_init = array(); } /** * 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_Patterns_Registry The main instance. */ public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } } /** * Registers a new pattern. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @param array $pattern_properties Array containing the properties of the pattern. * @return bool True if the pattern was registered with success and false otherwise. */ function register_block_pattern( $pattern_name, $pattern_properties ) { return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties ); } /** * Unregisters a pattern. * * @since 5.5.0 * * @param string $pattern_name Pattern name including namespace. * @return bool True if the pattern was unregistered with success and false otherwise. */ function unregister_block_pattern( $pattern_name ) { return WP_Block_Patterns_Registry::get_instance()->unregister( $pattern_name ); }
[+]
..
[-] class-wp-block-pattern-categories-registry.php
[edit]
[-] session.php
[edit]
[-] category.php
[edit]
[-] http.php
[edit]
[-] class-wp-editor.php
[edit]
[-] atomlib.php
[edit]
[+]
js
[-] https-migration.php
[edit]
[-] class-phpmailer.php
[edit]
[-] theme.php
[edit]
[-] class-wp-user-request.php
[edit]
[-] feed-rdf.php
[edit]
[-] functions.wp-scripts.php
[edit]
[-] registration.php
[edit]
[-] block-template.php
[edit]
[-] shortcodes.php
[edit]
[-] class-wp-oembed-controller.php
[edit]
[-] class-wp-dependency.php
[edit]
[+]
block-supports
[+]
widgets
[-] class-wp-comment-query.php
[edit]
[-] class-wp-hook.php
[edit]
[-] ms-site.php
[edit]
[+]
random_compat
[-] deprecated.php
[edit]
[-] class-wp-application-passwords.php
[edit]
[-] class-wp-term-query.php
[edit]
[-] feed-atom.php
[edit]
[-] class-wp.php
[edit]
[+]
sodium_compat
[+]
IXR
[-] ms-default-filters.php
[edit]
[-] class-wp-locale.php
[edit]
[+]
sitemaps
[-] class-wp-user-query.php
[edit]
[-] formatting.php
[edit]
[+]
pomo
[-] feed.php
[edit]
[-] wp-blog-header.php
[edit]
[-] theme-i18n.json
[edit]
[-] default-constants.php
[edit]
[-] class-wp-image-editor-imagick.php
[edit]
[-] comment.php
[edit]
[-] class-wp-ajax-response.php
[edit]
[-] option.php
[edit]
[-] block-editor.php
[edit]
[-] class-wp-post.php
[edit]
[-] class-http.php
[edit]
[-] class-wp-list-util.php
[edit]
[-] class-IXR.php
[edit]
[-] class-wp-rewrite.php
[edit]
[-] class-wp-http-proxy.php
[edit]
[-] template.php
[edit]
[-] block-patterns.php
[edit]
[-] class-walker-comment.php
[edit]
[-] locale.php
[edit]
[-] class-wp-post-type.php
[edit]
[-] class-wp-block-parser.php
[edit]
[+]
Requests
[-] wp-db.php
[edit]
[-] spl-autoload-compat.php
[edit]
[-] class-wp-http-requests-hooks.php
[edit]
[-] capabilities.php
[edit]
[-] pluggable.php
[edit]
[-] widgets.php
[edit]
[-] vars.php
[edit]
[-] post.php
[edit]
[-] feed-rss2-comments.php
[edit]
[-] class-wp-block-patterns-registry.php
[edit]
[-] plugin.php
[edit]
[-] functions.wp-styles.php
[edit]
[-] pluggable-deprecated.php
[edit]
[-] class-wp-image-editor.php
[edit]
[+]
certificates
[-] class-wp-recovery-mode-cookie-service.php
[edit]
[-] rss.php
[edit]
[-] class-wp-fatal-error-handler.php
[edit]
[-] default-filters.php
[edit]
[-] comment-template.php
[edit]
[-] class-wp-error.php
[edit]
[-] class-wp-term.php
[edit]
[-] class-wp-block-list.php
[edit]
[-] cron.php
[edit]
[-] class-wp-block-type.php
[edit]
[-] update.php
[edit]
[-] class-wp-paused-extensions-storage.php
[edit]
[-] link-template.php
[edit]
[-] class-wp-customize-control.php
[edit]
[-] class-wp-feed-cache.php
[edit]
[-] category-template.php
[edit]
[-] class-wp-theme.php
[edit]
[-] media-template.php
[edit]
[-] class-wp-block-supports.php
[edit]
[-] template-loader.php
[edit]
[-] revision.php
[edit]
[+]
theme-compat
[-] class-wp-widget.php
[edit]
[-] class-wp-session-tokens.php
[edit]
[-] ms-settings.php
[edit]
[-] class-wp-site-query.php
[edit]
[-] class-wp-simplepie-file.php
[edit]
[-] class-wp-customize-nav-menus.php
[edit]
[-] sitemaps.php
[edit]
[-] post-thumbnail-template.php
[edit]
[-] class-wp-taxonomy.php
[edit]
[-] class-smtp.php
[edit]
[-] class-wp-matchesmapregex.php
[edit]
[-] class-phpass.php
[edit]
[-] class-wp-tax-query.php
[edit]
[-] embed-template.php
[edit]
[-] class-wp-theme-json.php
[edit]
[-] compat.php
[edit]
[-] rest-api.php
[edit]
[-] bookmark-template.php
[edit]
[-] class-pop3.php
[edit]
[-] class-wp-recovery-mode-link-service.php
[edit]
[-] bookmark.php
[edit]
[-] media.php
[edit]
[-] class-wp-text-diff-renderer-inline.php
[edit]
[-] author-template.php
[edit]
[-] class-wp-block-type-registry.php
[edit]
[-] embed.php
[edit]
[-] class-wp-recovery-mode-key-service.php
[edit]
[+]
blocks
[-] cache.php
[edit]
[-] admin-bar.php
[edit]
[+]
css
[-] ms-network.php
[edit]
[-] class-wp-customize-panel.php
[edit]
[-] rss-functions.php
[edit]
[-] class-walker-page-dropdown.php
[edit]
[-] class-wp-network-query.php
[edit]
[-] nav-menu.php
[edit]
[-] nav-menu-template.php
[edit]
[-] error-protection.php
[edit]
[-] query.php
[edit]
[+]
rest-api
[-] default-widgets.php
[edit]
[-] feed-rss.php
[edit]
[-] feed-atom-comments.php
[edit]
[-] class-wp-block-styles-registry.php
[edit]
[-] registration-functions.php
[edit]
[+]
Text
[+]
assets
[-] class-wp-customize-setting.php
[edit]
[-] class-wp-block-template.php
[edit]
[-] version.php
[edit]
[-] class-wp-customize-section.php
[edit]
[-] general-template.php
[edit]
[-] wp-diff.php
[edit]
[-] canonical.php
[edit]
[-] class-wp-walker.php
[edit]
[-] class-wp-role.php
[edit]
[-] taxonomy.php
[edit]
[-] class.wp-scripts.php
[edit]
[-] class-wp-roles.php
[edit]
[-] class-wp-feed-cache-transient.php
[edit]
[-] class-wp-http-response.php
[edit]
[-] class-wp-user-meta-session-tokens.php
[edit]
[-] .htaccess
[edit]
[-] class-walker-page.php
[edit]
[-] kses.php
[edit]
[+]
fonts
[+]
block-patterns
[-] ms-load.php
[edit]
[-] meta.php
[edit]
[-] theme-templates.php
[edit]
[-] class.wp-dependencies.php
[edit]
[-] post-formats.php
[edit]
[-] l10n.php
[edit]
[-] class-wp-customize-manager.php
[edit]
[-] ms-blogs.php
[edit]
[-] class-walker-category-dropdown.php
[edit]
[-] class-wp-user.php
[edit]
[+]
PHPMailer
[-] ms-files.php
[edit]
[-] rewrite.php
[edit]
[-] script-loader.php
[edit]
[-] class-wp-comment.php
[edit]
[+]
customize
[-] functions.php
[edit]
[-] load.php
[edit]
[+]
images
[-] class-wp-metadata-lazyloader.php
[edit]
[-] class-wp-admin-bar.php
[edit]
[+]
ID3
[-] wlwmanifest.xml
[edit]
[-] class-wp-recovery-mode.php
[edit]
[-] class-wp-simplepie-sanitize-kses.php
[edit]
[-] class-wp-embed.php
[edit]
[-] user.php
[edit]
[-] blocks.php
[edit]
[-] class.wp-styles.php
[edit]
[-] class-oembed.php
[edit]
[-] class-snoopy.php
[edit]
[-] class-wp-block.php
[edit]
[-] post-template.php
[edit]
[-] class-wp-text-diff-renderer-table.php
[edit]
[-] class-requests.php
[edit]
[+]
SimplePie
[-] ms-functions.php
[edit]
[-] class-wp-http-streams.php
[edit]
[-] cache-compat.php
[edit]
[-] ms-deprecated.php
[edit]
[-] about.php
[edit]
[-] class-walker-category.php
[edit]
[-] class-wp-http-requests-response.php
[edit]
[-] class-wp-http-ixr-client.php
[edit]
[-] class-wp-object-cache.php
[edit]
[-] class-wp-http-curl.php
[edit]
[-] date.php
[edit]
[-] theme.json
[edit]
[-] class-wp-http-cookie.php
[edit]
[-] feed-rss2.php
[edit]
[-] class-wp-widget-factory.php
[edit]
[-] class-wp-meta-query.php
[edit]
[-] class-wp-oembed.php
[edit]
[-] error_log
[edit]
[-] class-wp-customize-widgets.php
[edit]
[-] class-wp-locale-switcher.php
[edit]
[-] ms-default-constants.php
[edit]
[-] robots-template.php
[edit]
[-] wp-cron.php
[edit]
[-] template-canvas.php
[edit]
[-] class-wp-block-editor-context.php
[edit]
[-] class-wp-http-encoding.php
[edit]
[-] class-simplepie.php
[edit]
[-] class-wp-network.php
[edit]
[-] block-template-utils.php
[edit]
[-] class-wp-image-editor-gd.php
[edit]
[-] class-feed.php
[edit]
[-] class-json.php
[edit]
[-] class-walker-nav-menu.php
[edit]
[-] class-wp-site.php
[edit]
[-] class-wp-theme-json-resolver.php
[edit]
[-] class-wp-query.php
[edit]
[-] class-wp-date-query.php
[edit]
[-] class-wp-recovery-mode-email-service.php
[edit]
[-] https-detection.php
[edit]
[-] class-wp-xmlrpc-server.php
[edit]