📁
SKYSHELL MANAGER-
🛒
PHP v8.2.30
Create Folder
Create File
Current Path:
home
/
powertibet
/
public_html
/
letketo.com
/
wp-includes
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📁
ID3
-
0755
🗑️
🔒
📁
IXR
-
0755
🗑️
🔒
📁
PHPMailer
-
0755
🗑️
🔒
📁
Requests
-
0755
🗑️
🔒
📁
SimplePie
-
0755
🗑️
🔒
📁
Text
-
0755
🗑️
🔒
📁
abilities-api
-
0755
🗑️
🔒
📁
assets
-
0755
🗑️
🔒
📁
block-bindings
-
0755
🗑️
🔒
📁
block-patterns
-
0755
🗑️
🔒
📁
block-supports
-
0755
🗑️
🔒
📁
blocks
-
0755
🗑️
🔒
📁
certificates
-
0755
🗑️
🔒
📁
css
-
0755
🗑️
🔒
📁
customize
-
0755
🗑️
🔒
📁
fonts
-
0755
🗑️
🔒
📁
html-api
-
0755
🗑️
🔒
📁
images
-
0755
🗑️
🔒
📁
interactivity-api
-
0755
🗑️
🔒
📁
js
-
0755
🗑️
🔒
📁
l10n
-
0755
🗑️
🔒
📁
php-compat
-
0755
🗑️
🔒
📁
pomo
-
0755
🗑️
🔒
📁
rest-api
-
0755
🗑️
🔒
📁
sitemaps
-
0755
🗑️
🔒
📁
sodium_compat
-
0755
🗑️
🔒
📁
style-engine
-
0755
🗑️
🔒
📁
theme-compat
-
0755
🗑️
🔒
📁
widgets
-
0755
🗑️
🔒
📄
abilities-api.php
23.8 KB
0644
🗑️
⬇️
✏️
🔒
📄
abilities.php
7.8 KB
0644
🗑️
⬇️
✏️
🔒
📄
admin-bar.php
36.1 KB
0644
🗑️
⬇️
✏️
🔒
📄
atomlib.php
11.9 KB
0644
🗑️
⬇️
✏️
🔒
📄
author-template.php
18.94 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-bindings.php
7.35 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-editor.php
28.6 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-i18n.json
0.31 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-patterns.php
12.9 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-template-utils.php
61.02 KB
0644
🗑️
⬇️
✏️
🔒
📄
block-template.php
15 KB
0644
🗑️
⬇️
✏️
🔒
📄
blocks.php
112.05 KB
0644
🗑️
⬇️
✏️
🔒
📄
bookmark-template.php
12.47 KB
0644
🗑️
⬇️
✏️
🔒
📄
bookmark.php
15.07 KB
0644
🗑️
⬇️
✏️
🔒
📄
cache-compat.php
9.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
cache.php
13.17 KB
0644
🗑️
⬇️
✏️
🔒
📄
canonical.php
33.83 KB
0644
🗑️
⬇️
✏️
🔒
📄
capabilities.php
42.63 KB
0644
🗑️
⬇️
✏️
🔒
📄
category-template.php
55.71 KB
0644
🗑️
⬇️
✏️
🔒
📄
category.php
12.53 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-IXR.php
2.55 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-avif-info.php
28.92 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-feed.php
0.53 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-http.php
0.36 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-json.php
42.65 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-oembed.php
0.39 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-phpmailer.php
0.65 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-pop3.php
20.63 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-requests.php
2.18 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-simplepie.php
0.44 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-walker-category-dropdown.php
2.41 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-walker-category.php
8.28 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-walker-comment.php
13.89 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-walker-page-dropdown.php
2.65 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-walker-page.php
7.43 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-ajax-response.php
5.14 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-application-passwords.php
16.7 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-bindings-registry.php
8.28 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-bindings-source.php
2.92 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-list.php
4.6 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-metadata-registry.php
11.62 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-parser-frame.php
1.97 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-parser.php
11.25 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-pattern-categories-registry.php
5.32 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-patterns-registry.php
10.6 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-styles-registry.php
6.34 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-template.php
1.99 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-templates-registry.php
7.02 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-type-registry.php
4.91 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-block-type.php
16.86 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-classic-to-block-menu-converter.php
3.97 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-comment-query.php
47.66 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-comment.php
9.22 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-customize-control.php
25.51 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-customize-nav-menus.php
56.65 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-customize-panel.php
10.46 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-customize-setting.php
29.26 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-customize-widgets.php
70.91 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-date-query.php
35.3 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-dependency.php
2.57 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-duotone.php
39.83 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-editor.php
70.64 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-embed.php
15.56 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-error.php
7.33 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-exception.php
0.25 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-fatal-error-handler.php
7.96 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-feed-cache-transient.php
3.23 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-feed-cache.php
0.95 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-hook.php
16.28 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-cookie.php
7.22 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-curl.php
12.95 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-encoding.php
6.53 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-ixr-client.php
3.42 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-proxy.php
5.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-requests-hooks.php
1.97 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-requests-response.php
4.3 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-response.php
2.91 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http-streams.php
16.46 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-http.php
40.6 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-image-editor-gd.php
20.22 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-image-editor.php
17.01 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-list-util.php
7.27 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-locale-switcher.php
6.62 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-locale.php
16.49 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-matchesmapregex.php
1.79 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-meta-query.php
29.82 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-metadata-lazyloader.php
6.67 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-network-query.php
19.42 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-network.php
12.01 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-object-cache.php
17.11 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-oembed-controller.php
6.74 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-oembed.php
30.93 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-paused-extensions-storage.php
4.99 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-phpmailer.php
4.25 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-plugin-dependencies.php
24.72 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-post-type.php
29.96 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-post.php
6.34 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-query.php
159.91 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-cookie-service.php
6.72 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-email-service.php
10.92 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-key-service.php
4.77 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-recovery-mode-link-service.php
3.38 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-recovery-mode.php
11.18 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-roles.php
9.17 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-script-modules.php
32.15 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-scripts.php
34.05 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-simplepie-file.php
3.47 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-simplepie-sanitize-kses.php
1.87 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-site.php
7.29 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-speculation-rules.php
7.35 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-styles.php
12.54 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-tax-query.php
19.12 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-taxonomy.php
18.12 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-term-query.php
39.99 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-term.php
5.17 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-text-diff-renderer-inline.php
0.96 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-text-diff-renderer-table.php
18.44 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-textdomain-registry.php
10.24 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-theme-json-data.php
1.77 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-theme-json-resolver.php
34.9 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-theme-json-schema.php
7.19 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-theme-json.php
160.5 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-theme.php
64.27 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-token-map.php
27.95 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-user-meta-session-tokens.php
2.94 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-user-request.php
2.25 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-user.php
22.5 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-walker.php
13.01 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-widget-factory.php
3.27 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-widget.php
18 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp-xmlrpc-server.php
210.4 KB
0644
🗑️
⬇️
✏️
🔒
📄
class-wp.php
25.86 KB
0644
🗑️
⬇️
✏️
🔒
📄
class.wp-scripts.php
0.33 KB
0644
🗑️
⬇️
✏️
🔒
📄
class.wp-styles.php
0.33 KB
0644
🗑️
⬇️
✏️
🔒
📄
comment-template.php
100.73 KB
0644
🗑️
⬇️
✏️
🔒
📄
comment.php
130.93 KB
0644
🗑️
⬇️
✏️
🔒
📄
compat.php
17.41 KB
0644
🗑️
⬇️
✏️
🔒
📄
cron.php
41.98 KB
0644
🗑️
⬇️
✏️
🔒
📄
date.php
0.39 KB
0644
🗑️
⬇️
✏️
🔒
📄
default-filters.php
37.02 KB
0644
🗑️
⬇️
✏️
🔒
📄
default-widgets.php
2.24 KB
0644
🗑️
⬇️
✏️
🔒
📄
embed.php
38 KB
0644
🗑️
⬇️
✏️
🔒
📄
error-protection.php
4.02 KB
0644
🗑️
⬇️
✏️
🔒
📄
feed-atom-comments.php
5.38 KB
0644
🗑️
⬇️
✏️
🔒
📄
feed-rdf.php
2.61 KB
0644
🗑️
⬇️
✏️
🔒
📄
feed-rss2-comments.php
4.04 KB
0644
🗑️
⬇️
✏️
🔒
📄
feed-rss2.php
3.71 KB
0644
🗑️
⬇️
✏️
🔒
📄
feed.php
24.6 KB
0644
🗑️
⬇️
✏️
🔒
📄
fonts.php
9.56 KB
0644
🗑️
⬇️
✏️
🔒
📄
formatting.php
346.43 KB
0644
🗑️
⬇️
✏️
🔒
📄
functions.php
281.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
functions.wp-scripts.php
14.95 KB
0644
🗑️
⬇️
✏️
🔒
📄
functions.wp-styles.php
8.44 KB
0644
🗑️
⬇️
✏️
🔒
📄
general-template.php
168.95 KB
0644
🗑️
⬇️
✏️
🔒
📄
global-styles-and-settings.php
20.71 KB
0644
🗑️
⬇️
✏️
🔒
📄
https-detection.php
5.72 KB
0644
🗑️
⬇️
✏️
🔒
📄
https-migration.php
4.63 KB
0644
🗑️
⬇️
✏️
🔒
📄
index.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
l10n.php
67.18 KB
0644
🗑️
⬇️
✏️
🔒
📄
load.php
55.19 KB
0644
🗑️
⬇️
✏️
🔒
📄
locale.php
0.16 KB
0644
🗑️
⬇️
✏️
🔒
📄
media.php
216 KB
0644
🗑️
⬇️
✏️
🔒
📄
ms-blogs.php
25.24 KB
0644
🗑️
⬇️
✏️
🔒
📄
ms-default-filters.php
6.48 KB
0644
🗑️
⬇️
✏️
🔒
📄
ms-files.php
2.79 KB
0644
🗑️
⬇️
✏️
🔒
📄
ms-functions.php
89.69 KB
0644
🗑️
⬇️
✏️
🔒
📄
ms-network.php
3.69 KB
0644
🗑️
⬇️
✏️
🔒
📄
nav-menu-template.php
25.38 KB
0644
🗑️
⬇️
✏️
🔒
📄
nav-menu.php
43.33 KB
0644
🗑️
⬇️
✏️
🔒
📄
pluggable-deprecated.php
6.18 KB
0644
🗑️
⬇️
✏️
🔒
📄
pluggable.php
124.47 KB
0644
🗑️
⬇️
✏️
🔒
📄
plugin.php
35.65 KB
0644
🗑️
⬇️
✏️
🔒
📄
post-formats.php
6.94 KB
0644
🗑️
⬇️
✏️
🔒
📄
post-template.php
67.04 KB
0644
🗑️
⬇️
✏️
🔒
📄
post-thumbnail-template.php
10.62 KB
0644
🗑️
⬇️
✏️
🔒
📄
registration-functions.php
0.2 KB
0644
🗑️
⬇️
✏️
🔒
📄
registration.php
0.2 KB
0644
🗑️
⬇️
✏️
🔒
📄
rest-api.php
98.29 KB
0644
🗑️
⬇️
✏️
🔒
📄
script-loader.php
154.63 KB
0644
🗑️
⬇️
✏️
🔒
📄
script-modules.php
9.68 KB
0644
🗑️
⬇️
✏️
🔒
📄
session.php
0.25 KB
0644
🗑️
⬇️
✏️
🔒
📄
shortcodes.php
23.49 KB
0644
🗑️
⬇️
✏️
🔒
📄
speculative-loading.php
8.4 KB
0644
🗑️
⬇️
✏️
🔒
📄
spl-autoload-compat.php
0.43 KB
0644
🗑️
⬇️
✏️
🔒
📄
style-engine.php
7.39 KB
0644
🗑️
⬇️
✏️
🔒
📄
taxonomy.php
172.91 KB
0644
🗑️
⬇️
✏️
🔒
📄
template-canvas.php
0.53 KB
0644
🗑️
⬇️
✏️
🔒
📄
template-loader.php
3.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
template.php
35.97 KB
0644
🗑️
⬇️
✏️
🔒
📄
theme-i18n.json
1.69 KB
0644
🗑️
⬇️
✏️
🔒
📄
theme-previews.php
2.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
theme.json
8.71 KB
0644
🗑️
⬇️
✏️
🔒
📄
theme.php
131.84 KB
0644
🗑️
⬇️
✏️
🔒
📄
txets.php
1.75 KB
0644
🗑️
⬇️
✏️
🔒
📄
update.php
37.45 KB
0644
🗑️
⬇️
✏️
🔒
📄
user.php
173.89 KB
0644
🗑️
⬇️
✏️
🔒
📄
utf8.php
7.09 KB
0644
🗑️
⬇️
✏️
🔒
📄
version.php
1.11 KB
0644
🗑️
⬇️
✏️
🔒
📄
widgets.php
69.46 KB
0644
🗑️
⬇️
✏️
🔒
📄
wp-blog-header.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
wp-db.php
0.43 KB
0644
🗑️
⬇️
✏️
🔒
📄
wp-diff.php
0.78 KB
0644
🗑️
⬇️
✏️
🔒
📄
wp-signup.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
Editing: block-bindings.php
<?php /** * Block Bindings API * * Contains functions for managing block bindings in WordPress. * * @package WordPress * @subpackage Block Bindings * @since 6.5.0 */ /** * Registers a new block bindings source. * * Registering a source consists of defining a **name** for that source and a callback function specifying * how to get a value from that source and pass it to a block attribute. * * Once a source is registered, any block that supports the Block Bindings API can use a value * from that source by setting its `metadata.bindings` attribute to a value that refers to the source. * * Note that `register_block_bindings_source()` should be called from a handler attached to the `init` hook. * * * ## Example * * ### Registering a source * * First, you need to define a function that will be used to get the value from the source. * * function my_plugin_get_custom_source_value( array $source_args, $block_instance, string $attribute_name ) { * // Your custom logic to get the value from the source. * // For example, you can use the `$source_args` to look up a value in a custom table or get it from an external API. * $value = $source_args['key']; * * return "The value passed to the block is: $value" * } * * The `$source_args` will contain the arguments passed to the source in the block's * `metadata.bindings` attribute. See the example in the "Usage in a block" section below. * * function my_plugin_register_block_bindings_sources() { * register_block_bindings_source( 'my-plugin/my-custom-source', array( * 'label' => __( 'My Custom Source', 'my-plugin' ), * 'get_value_callback' => 'my_plugin_get_custom_source_value', * ) ); * } * add_action( 'init', 'my_plugin_register_block_bindings_sources' ); * * ### Usage in a block * * In a block's `metadata.bindings` attribute, you can specify the source and * its arguments. Such a block will use the source to override the block * attribute's value. For example: * * <!-- wp:paragraph { * "metadata": { * "bindings": { * "content": { * "source": "my-plugin/my-custom-source", * "args": { * "key": "you can pass any custom arguments here" * } * } * } * } * } --> * <p>Fallback text that gets replaced.</p> * <!-- /wp:paragraph --> * * @since 6.5.0 * * @param string $source_name The name of the source. It must be a string containing a namespace prefix, i.e. * `my-plugin/my-custom-source`. It must only contain lowercase alphanumeric * characters, the forward slash `/` and dashes. * @param array $source_properties { * The array of arguments that are used to register a source. * * @type string $label The label of the source. * @type callable $get_value_callback A callback executed when the source is processed during block rendering. * The callback should have the following signature: * * `function( $source_args, $block_instance, $attribute_name ): mixed` * - @param array $source_args Array containing source arguments * used to look up the override value, * i.e. {"key": "foo"}. * - @param WP_Block $block_instance The block instance. * - @param string $attribute_name The name of an attribute. * The callback has a mixed return type; it may return a string to override * the block's original value, null, false to remove an attribute, etc. * @type string[] $uses_context Optional. Array of values to add to block `uses_context` needed by the source. * } * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. */ function register_block_bindings_source( string $source_name, array $source_properties ) { return WP_Block_Bindings_Registry::get_instance()->register( $source_name, $source_properties ); } /** * Unregisters a block bindings source. * * @since 6.5.0 * * @param string $source_name Block bindings source name including namespace. * @return WP_Block_Bindings_Source|false The unregistered block bindings source on success and `false` otherwise. */ function unregister_block_bindings_source( string $source_name ) { return WP_Block_Bindings_Registry::get_instance()->unregister( $source_name ); } /** * Retrieves the list of all registered block bindings sources. * * @since 6.5.0 * * @return WP_Block_Bindings_Source[] The array of registered block bindings sources. */ function get_all_registered_block_bindings_sources() { return WP_Block_Bindings_Registry::get_instance()->get_all_registered(); } /** * Retrieves a registered block bindings source. * * @since 6.5.0 * * @param string $source_name The name of the source. * @return WP_Block_Bindings_Source|null The registered block bindings source, or `null` if it is not registered. */ function get_block_bindings_source( string $source_name ) { return WP_Block_Bindings_Registry::get_instance()->get_registered( $source_name ); } /** * Retrieves the list of block attributes supported by block bindings. * * @since 6.9.0 * * @param string $block_type The block type whose supported attributes are being retrieved. * @return array The list of block attributes that are supported by block bindings. */ function get_block_bindings_supported_attributes( $block_type ) { $block_bindings_supported_attributes = array( 'core/paragraph' => array( 'content' ), 'core/heading' => array( 'content' ), 'core/image' => array( 'id', 'url', 'title', 'alt', 'caption' ), 'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ), 'core/post-date' => array( 'datetime' ), 'core/navigation-link' => array( 'url' ), 'core/navigation-submenu' => array( 'url' ), ); $supported_block_attributes = isset( $block_type, $block_bindings_supported_attributes[ $block_type ] ) ? $block_bindings_supported_attributes[ $block_type ] : array(); /** * Filters the supported block attributes for block bindings. * * @since 6.9.0 * * @param string[] $supported_block_attributes The block's attributes that are supported by block bindings. * @param string $block_type The block type whose attributes are being filtered. */ $supported_block_attributes = apply_filters( 'block_bindings_supported_attributes', $supported_block_attributes, $block_type ); /** * Filters the supported block attributes for block bindings. * * The dynamic portion of the hook name, `$block_type`, refers to the block type * whose attributes are being filtered. * * @since 6.9.0 * * @param string[] $supported_block_attributes The block's attributes that are supported by block bindings. */ $supported_block_attributes = apply_filters( "block_bindings_supported_attributes_{$block_type}", $supported_block_attributes ); return $supported_block_attributes; }
💾 Save Changes