🚀 Auto Backup WP
var
/
www
/
vhosts
/
construcciondepiscinas.top
/
httpdocs
/
wp-includes
/
Name
Size
Perm
Action
assets/
DIR
drwxr-xr-x
🗑️
📝
🔧
block-patterns/
DIR
drwxr-xr-x
🗑️
📝
🔧
block-supports/
DIR
drwxr-xr-x
🗑️
📝
🔧
blocks/
DIR
drwxr-xr-x
🗑️
📝
🔧
certificates/
DIR
drwxr-xr-x
🗑️
📝
🔧
css/
DIR
drwxr-xr-x
🗑️
📝
🔧
customize/
DIR
drwxr-xr-x
🗑️
📝
🔧
fonts/
DIR
drwxr-xr-x
🗑️
📝
🔧
ID3/
DIR
drwxr-xr-x
🗑️
📝
🔧
images/
DIR
drwxr-xr-x
🗑️
📝
🔧
IXR/
DIR
drwxr-xr-x
🗑️
📝
🔧
js/
DIR
drwxr-xr-x
🗑️
📝
🔧
php-compat/
DIR
drwxr-xr-x
🗑️
📝
🔧
PHPMailer/
DIR
drwxr-xr-x
🗑️
📝
🔧
pomo/
DIR
drwxr-xr-x
🗑️
📝
🔧
random_compat/
DIR
drwxr-xr-x
🗑️
📝
🔧
Requests/
DIR
drwxr-xr-x
🗑️
📝
🔧
rest-api/
DIR
drwxr-xr-x
🗑️
📝
🔧
SimplePie/
DIR
drwxr-xr-x
🗑️
📝
🔧
sitemaps/
DIR
drwxr-xr-x
🗑️
📝
🔧
sodium_compat/
DIR
drwxr-xr-x
🗑️
📝
🔧
style-engine/
DIR
drwxr-xr-x
🗑️
📝
🔧
Text/
DIR
drwxr-xr-x
🗑️
📝
🔧
theme-compat/
DIR
drwxr-xr-x
🗑️
📝
🔧
widgets/
DIR
drwxr-xr-x
🗑️
📝
🔧
admin-bar.php
34121B
-rw-r--r--
🗑️
✏️
📝
🔧
atomlib.php
11950B
-rw-r--r--
🗑️
✏️
📝
🔧
author-template.php
18750B
-rw-r--r--
🗑️
✏️
📝
🔧
block-editor.php
23387B
-rw-r--r--
🗑️
✏️
📝
🔧
block-i18n.json
316B
-rw-r--r--
🗑️
✏️
📝
🔧
block-patterns.php
11151B
-rw-r--r--
🗑️
✏️
📝
🔧
block-template-utils.php
43566B
-rw-r--r--
🗑️
✏️
📝
🔧
block-template.php
11505B
-rw-r--r--
🗑️
✏️
📝
🔧
blocks.php
52674B
-rw-r--r--
🗑️
✏️
📝
🔧
bookmark-template.php
12904B
-rw-r--r--
🗑️
✏️
📝
🔧
bookmark.php
15346B
-rw-r--r--
🗑️
✏️
📝
🔧
cache-compat.php
5969B
-rw-r--r--
🗑️
✏️
📝
🔧
cache.php
13474B
-rw-r--r--
🗑️
✏️
📝
🔧
canonical.php
33330B
-rw-r--r--
🗑️
✏️
📝
🔧
capabilities.php
40000B
-rw-r--r--
🗑️
✏️
📝
🔧
category-template.php
56920B
-rw-r--r--
🗑️
✏️
📝
🔧
category.php
12698B
-rw-r--r--
🗑️
✏️
📝
🔧
class-feed.php
529B
-rw-r--r--
🗑️
✏️
📝
🔧
class-http.php
367B
-rw-r--r--
🗑️
✏️
📝
🔧
class-IXR.php
2543B
-rw-r--r--
🗑️
✏️
📝
🔧
class-json.php
43682B
-rw-r--r--
🗑️
✏️
📝
🔧
class-oembed.php
401B
-rw-r--r--
🗑️
✏️
📝
🔧
class-phpass.php
6699B
-rw-r--r--
🗑️
✏️
📝
🔧
class-phpmailer.php
664B
-rw-r--r--
🗑️
✏️
📝
🔧
class-pop3.php
20837B
-rw-r--r--
🗑️
✏️
📝
🔧
class-requests.php
30431B
-rw-r--r--
🗑️
✏️
📝
🔧
class-simplepie.php
98080B
-rw-r--r--
🗑️
✏️
📝
🔧
class-smtp.php
457B
-rw-r--r--
🗑️
✏️
📝
🔧
class-snoopy.php
37715B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-category-dropdown.php
2473B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-category.php
8471B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-comment.php
14214B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-nav-menu.php
9376B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-page-dropdown.php
2703B
-rw-r--r--
🗑️
✏️
📝
🔧
class-walker-page.php
7602B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-admin-bar.php
17487B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-ajax-response.php
5266B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-application-passwords.php
12262B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-list.php
4749B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-parser.php
15202B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-patterns-registry.php
7852B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-styles-registry.php
5883B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-supports.php
5489B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-template.php
1842B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-type-registry.php
5013B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block-type.php
13991B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-block.php
8352B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-comment-query.php
47672B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-comment.php
9347B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-control.php
25739B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-manager.php
201814B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-nav-menus.php
56897B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-panel.php
10455B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-section.php
10999B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-setting.php
29890B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-customize-widgets.php
71328B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-date-query.php
35481B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-dependencies.php
14059B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-dependency.php
2535B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-editor.php
71691B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-embed.php
15983B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-error.php
7331B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-feed-cache-transient.php
2586B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-feed-cache.php
996B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-hook.php
15717B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-http-cookie.php
7412B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-http-ixr-client.php
3501B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-http-requests-hooks.php
2010B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-http-response.php
2977B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-http.php
39922B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-image-editor-gd.php
16570B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-image-editor-imagick.php
27874B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-image-editor.php
17061B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-list-util.php
7018B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-locale-switcher.php
5161B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-locale.php
14535B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-matchesmapregex.php
1826B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-meta-query.php
30401B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-metadata-lazyloader.php
5378B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-network-query.php
19277B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-network.php
12176B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-object-cache.php
17589B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-oembed-controller.php
6853B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-oembed.php
30885B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-paused-extensions-storage.php
5062B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-post-type.php
25781B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-post.php
6484B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-query.php
148533B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-recovery-mode-cookie-service.php
6877B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-recovery-mode-email-service.php
11400B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-recovery-mode-key-service.php
4296B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-recovery-mode-link-service.php
3463B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-recovery-mode.php
11426B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-rewrite.php
63075B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-role.php
2524B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-roles.php
8578B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-scripts.php
19310B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-session-tokens.php
7451B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-simplepie-file.php
3402B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-simplepie-sanitize-kses.php
1800B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-site-query.php
30949B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-site.php
7454B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-styles.php
10892B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-tax-query.php
19586B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-taxonomy.php
18530B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-term-query.php
39932B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-term.php
5298B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-textdomain-registry.php
4860B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-theme-json-data.php
1554B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-theme-json-resolver.php
22423B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-theme-json-schema.php
4322B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-theme-json.php
107519B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-theme.php
55391B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-user-meta-session-tokens.php
2990B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-user-query.php
39821B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-user.php
22762B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-walker.php
13167B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-widget-factory.php
3347B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-widget.php
18403B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp-xmlrpc-server.php
213279B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wp.php
25997B
-rw-r--r--
🗑️
✏️
📝
🔧
class-wpdb.php
110420B
-rw-r--r--
🗑️
✏️
📝
🔧
class.wp-dependencies.php
373B
-rw-r--r--
🗑️
✏️
📝
🔧
class.wp-scripts.php
343B
-rw-r--r--
🗑️
✏️
📝
🔧
class.wp-styles.php
338B
-rw-r--r--
🗑️
✏️
📝
🔧
comment-template.php
96284B
-rw-r--r--
🗑️
✏️
📝
🔧
comment.php
127309B
-rw-r--r--
🗑️
✏️
📝
🔧
compat.php
15006B
-rw-r--r--
🗑️
✏️
📝
🔧
cron.php
40425B
-rw-r--r--
🗑️
✏️
📝
🔧
date.php
400B
-rw-r--r--
🗑️
✏️
📝
🔧
default-constants.php
10534B
-rw-r--r--
🗑️
✏️
📝
🔧
default-filters.php
31367B
-rw-r--r--
🗑️
✏️
📝
🔧
default-widgets.php
2222B
-rw-r--r--
🗑️
✏️
📝
🔧
deprecated.php
134332B
-rw-r--r--
🗑️
✏️
📝
🔧
embed-template.php
338B
-rw-r--r--
🗑️
✏️
📝
🔧
embed.php
37461B
-rw-r--r--
🗑️
✏️
📝
🔧
error-protection.php
4118B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-atom-comments.php
5444B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-atom.php
3048B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-rdf.php
2668B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-rss.php
1189B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-rss2-comments.php
4070B
-rw-r--r--
🗑️
✏️
📝
🔧
feed-rss2.php
3799B
-rw-r--r--
🗑️
✏️
📝
🔧
feed.php
23004B
-rw-r--r--
🗑️
✏️
📝
🔧
formatting.php
332005B
-rw-r--r--
🗑️
✏️
📝
🔧
functions.php
259771B
-rw-r--r--
🗑️
✏️
📝
🔧
functions.wp-styles.php
8571B
-rw-r--r--
🗑️
✏️
📝
🔧
general-template.php
167424B
-rw-r--r--
🗑️
✏️
📝
🔧
global-styles-and-settings.php
8544B
-rw-r--r--
🗑️
✏️
📝
🔧
http.php
23143B
-rw-r--r--
🗑️
✏️
📝
🔧
https-detection.php
6862B
-rw-r--r--
🗑️
✏️
📝
🔧
https-migration.php
4730B
-rw-r--r--
🗑️
✏️
📝
🔧
kses.php
69739B
-rw-r--r--
🗑️
✏️
📝
🔧
l10n.php
60333B
-rw-r--r--
🗑️
✏️
📝
🔧
link-template.php
150140B
-rw-r--r--
🗑️
✏️
📝
🔧
load.php
50976B
-rw-r--r--
🗑️
✏️
📝
🔧
locale.php
162B
-rw-r--r--
🗑️
✏️
📝
🔧
media-template.php
60509B
-rw-r--r--
🗑️
✏️
📝
🔧
media.php
192328B
-rw-r--r--
🗑️
✏️
📝
🔧
meta.php
63019B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-blogs.php
25409B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-default-constants.php
4891B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-default-filters.php
6629B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-deprecated.php
21642B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-files.php
2654B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-functions.php
90959B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-load.php
19838B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-network.php
3798B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-settings.php
4124B
-rw-r--r--
🗑️
✏️
📝
🔧
ms-site.php
39875B
-rw-r--r--
🗑️
✏️
📝
🔧
nav-menu-template.php
23907B
-rw-r--r--
🗑️
✏️
📝
🔧
nav-menu.php
42311B
-rw-r--r--
🗑️
✏️
📝
🔧
option.php
78804B
-rw-r--r--
🗑️
✏️
📝
🔧
pluggable-deprecated.php
6263B
-rw-r--r--
🗑️
✏️
📝
🔧
pluggable.php
109424B
-rw-r--r--
🗑️
✏️
📝
🔧
plugin.php
35990B
-rw-r--r--
🗑️
✏️
📝
🔧
post-formats.php
7079B
-rw-r--r--
🗑️
✏️
📝
🔧
post-template.php
65860B
-rw-r--r--
🗑️
✏️
📝
🔧
post-thumbnail-template.php
10902B
-rw-r--r--
🗑️
✏️
📝
🔧
post.php
275540B
-rw-r--r--
🗑️
✏️
📝
🔧
query.php
36898B
-rw-r--r--
🗑️
✏️
📝
🔧
registration-functions.php
200B
-rw-r--r--
🗑️
✏️
📝
🔧
registration.php
200B
-rw-r--r--
🗑️
✏️
📝
🔧
rest-api.php
96241B
-rw-r--r--
🗑️
✏️
📝
🔧
revision.php
24960B
-rw-r--r--
🗑️
✏️
📝
🔧
rewrite.php
19500B
-rw-r--r--
🗑️
✏️
📝
🔧
robots-template.php
5185B
-rw-r--r--
🗑️
✏️
📝
🔧
rss-functions.php
255B
-rw-r--r--
🗑️
✏️
📝
🔧
rss.php
22979B
-rw-r--r--
🗑️
✏️
📝
🔧
script-loader.php
136451B
-rw-r--r--
🗑️
✏️
📝
🔧
session.php
258B
-rw-r--r--
🗑️
✏️
📝
🔧
shortcodes.php
22386B
-rw-r--r--
🗑️
✏️
📝
🔧
sitemaps.php
3238B
-rw-r--r--
🗑️
✏️
📝
🔧
spl-autoload-compat.php
441B
-rw-r--r--
🗑️
✏️
📝
🔧
style-engine.php
6395B
-rw-r--r--
🗑️
✏️
📝
🔧
taxonomy.php
172145B
-rw-r--r--
🗑️
✏️
📝
🔧
template-canvas.php
592B
-rw-r--r--
🗑️
✏️
📝
🔧
template-loader.php
3012B
-rw-r--r--
🗑️
✏️
📝
🔧
template.php
23335B
-rw-r--r--
🗑️
✏️
📝
🔧
theme-i18n.json
1151B
-rw-r--r--
🗑️
✏️
📝
🔧
theme-templates.php
5483B
-rw-r--r--
🗑️
✏️
📝
🔧
theme.json
9408B
-rw-r--r--
🗑️
✏️
📝
🔧
theme.php
129615B
-rw-r--r--
🗑️
✏️
📝
🔧
update.php
34664B
-rw-r--r--
🗑️
✏️
📝
🔧
user.php
169229B
-rw-r--r--
🗑️
✏️
📝
🔧
vars.php
5870B
-rw-r--r--
🗑️
✏️
📝
🔧
version.php
959B
-rw-r--r--
🗑️
✏️
📝
🔧
widgets.php
69226B
-rw-r--r--
🗑️
✏️
📝
🔧
wlwmanifest.xml
1045B
-rw-r--r--
🗑️
✏️
📝
🔧
wp-db.php
445B
-rw-r--r--
🗑️
✏️
📝
🔧
wp-diff.php
647B
-rw-r--r--
🗑️
✏️
📝
🔧
<?php /** * Blocks API: WP_Block_Patterns_Registry class * * @package WordPress * @subpackage Blocks * @since 5.5.0 */ /** * Class used for interacting with block patterns. * * @since 5.5.0 */ #[AllowDynamicProperties] final class WP_Block_Patterns_Registry { /** * Registered block patterns array. * * @since 5.5.0 * @var array[] */ private $registered_patterns = array(); /** * Patterns registered outside the `init` action. * * @since 6.0.0 * @var array[] */ private $registered_patterns_outside_init = 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 block pattern. * * @since 5.5.0 * @since 5.8.0 Added support for the `blockTypes` property. * * @param string $pattern_name Block pattern name including namespace. * @param array $pattern_properties { * List of properties for the block pattern. * * @type string $title Required. A human-readable title for the pattern. * @type string $content Required. Block HTML markup for the pattern. * @type string $description Optional. Visually hidden text used to describe the pattern in the * inserter. A description is optional, but is strongly * encouraged when the title does not fully describe what the * pattern does. The description will help users discover the * pattern while searching. * @type int $viewportWidth Optional. The intended width of the pattern to allow for a scaled * preview within the pattern inserter. * @type array $categories Optional. A list of registered pattern categories used to group block * patterns. Block patterns can be shown on multiple categories. * A category must be registered separately in order to be used * here. * @type array $blockTypes Optional. A list of block names including namespace that could use * the block pattern in certain contexts (placeholder, transforms). * The block pattern is available in the block editor inserter * regardless of this list of block names. * Certain blocks support further specificity besides the block name * (e.g. for `core/template-part` you can specify areas * like `core/template-part/header` or `core/template-part/footer`). * @type array $keywords Optional. A list of aliases or keywords that help users discover the * pattern while searching. * } * @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; } $pattern = array_merge( $pattern_properties, array( 'name' => $pattern_name ) ); $this->registered_patterns[ $pattern_name ] = $pattern; // If the pattern 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_patterns_outside_init[ $pattern_name ] = $pattern; } return true; } /** * Unregisters a block pattern. * * @since 5.5.0 * * @param string $pattern_name Block 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 ] ); unset( $this->registered_patterns_outside_init[ $pattern_name ] ); return true; } /** * Retrieves an array containing the properties of a registered block pattern. * * @since 5.5.0 * * @param string $pattern_name Block 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 block patterns. * * @since 5.5.0 * * @param bool $outside_init_only Return only patterns registered outside the `init` action. * @return array[] Array of arrays containing the registered block patterns properties, * and per style. */ public function get_all_registered( $outside_init_only = false ) { return array_values( $outside_init_only ? $this->registered_patterns_outside_init : $this->registered_patterns ); } /** * Checks if a block pattern is registered. * * @since 5.5.0 * * @param string $pattern_name Block 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 block pattern. * * @since 5.5.0 * * @param string $pattern_name Block pattern name including namespace. * @param array $pattern_properties List of properties for the block pattern. * See WP_Block_Patterns_Registry::register() for accepted arguments. * @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 block pattern. * * @since 5.5.0 * * @param string $pattern_name Block 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 ); }
Terminal Command