run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
23.8 KB
2026-03-11 16:18:51
R W Run
7.8 KB
2026-03-11 16:18:52
R W Run
36.1 KB
2026-03-11 16:18:51
R W Run
11.9 KB
2026-03-11 16:18:52
R W Run
18.94 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:52
R W Run
28.6 KB
2026-03-11 16:18:51
R W Run
316 By
2026-03-11 16:18:51
R W Run
12.9 KB
2026-03-11 16:18:51
R W Run
61.02 KB
2026-03-11 16:18:52
R W Run
15 KB
2026-03-11 16:18:51
R W Run
112.05 KB
2026-03-11 16:18:51
R W Run
12.47 KB
2026-03-11 16:18:51
R W Run
15.07 KB
2026-03-11 16:18:52
R W Run
9.84 KB
2026-03-11 16:18:52
R W Run
13.17 KB
2026-03-11 16:18:52
R W Run
33.83 KB
2026-03-11 16:18:51
R W Run
42.63 KB
2026-03-11 16:18:51
R W Run
55.71 KB
2026-03-11 16:18:52
R W Run
12.53 KB
2026-03-11 16:18:51
R W Run
2.55 KB
2026-03-11 16:18:52
R W Run
28.92 KB
2026-03-11 16:18:52
R W Run
539 By
2026-03-11 16:18:51
R W Run
367 By
2026-03-11 16:18:52
R W Run
42.65 KB
2026-03-11 16:18:51
R W Run
401 By
2026-03-11 16:18:51
R W Run
6.61 KB
2026-03-11 16:18:51
R W Run
664 By
2026-03-11 16:18:52
R W Run
20.63 KB
2026-03-11 16:18:51
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
453 By
2026-03-11 16:18:52
R W Run
457 By
2026-03-11 16:18:51
R W Run
36.83 KB
2026-03-11 16:18:52
R W Run
2.41 KB
2026-03-11 16:18:52
R W Run
8.28 KB
2026-03-11 16:18:51
R W Run
13.89 KB
2026-03-11 16:18:51
R W Run
11.76 KB
2026-03-11 16:18:51
R W Run
2.65 KB
2026-03-11 16:18:51
R W Run
7.43 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
5.14 KB
2026-03-11 16:18:52
R W Run
16.7 KB
2026-03-11 16:18:51
R W Run
8.28 KB
2026-03-11 16:18:52
R W Run
2.92 KB
2026-03-11 16:18:52
R W Run
1.32 KB
2026-03-11 16:18:51
R W Run
4.6 KB
2026-03-11 16:18:52
R W Run
11.62 KB
2026-03-11 16:18:52
R W Run
2.5 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
11.25 KB
2026-03-11 16:18:52
R W Run
5.32 KB
2026-03-11 16:18:51
R W Run
10.99 KB
2026-03-11 16:18:52
R W Run
68.32 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:51
R W Run
5.49 KB
2026-03-11 16:18:51
R W Run
1.99 KB
2026-03-11 16:18:52
R W Run
7.02 KB
2026-03-11 16:18:51
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
16.86 KB
2026-03-11 16:18:51
R W Run
24.23 KB
2026-03-11 16:18:51
R W Run
3.97 KB
2026-03-11 16:18:51
R W Run
47.66 KB
2026-03-11 16:18:51
R W Run
9.22 KB
2026-03-11 16:18:51
R W Run
25.51 KB
2026-03-11 16:18:51
R W Run
198.38 KB
2026-03-11 16:18:52
R W Run
56.65 KB
2026-03-11 16:18:51
R W Run
10.46 KB
2026-03-11 16:18:51
R W Run
10.95 KB
2026-03-11 16:18:52
R W Run
29.26 KB
2026-03-11 16:18:51
R W Run
70.91 KB
2026-03-11 16:18:52
R W Run
35.3 KB
2026-03-11 16:18:52
R W Run
16.61 KB
2026-03-11 16:18:52
R W Run
2.57 KB
2026-03-11 16:18:52
R W Run
39.83 KB
2026-03-11 16:18:51
R W Run
70.64 KB
2026-03-11 16:18:51
R W Run
15.56 KB
2026-03-11 16:18:52
R W Run
7.33 KB
2026-03-11 16:18:52
R W Run
253 By
2026-03-11 16:18:51
R W Run
7.96 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
969 By
2026-03-11 16:18:52
R W Run
16.28 KB
2026-03-11 16:18:51
R W Run
7.22 KB
2026-03-11 16:18:51
R W Run
12.95 KB
2026-03-11 16:18:51
R W Run
6.53 KB
2026-03-11 16:18:51
R W Run
3.42 KB
2026-03-11 16:18:52
R W Run
5.84 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
4.3 KB
2026-03-11 16:18:52
R W Run
2.91 KB
2026-03-11 16:18:51
R W Run
16.46 KB
2026-03-11 16:18:52
R W Run
40.6 KB
2026-03-11 16:18:51
R W Run
20.22 KB
2026-03-11 16:18:51
R W Run
36.11 KB
2026-03-11 16:18:52
R W Run
17.01 KB
2026-03-11 16:18:51
R W Run
7.27 KB
2026-03-11 16:18:52
R W Run
6.62 KB
2026-03-11 16:18:52
R W Run
16.49 KB
2026-03-11 16:18:52
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
29.82 KB
2026-03-11 16:18:51
R W Run
6.67 KB
2026-03-11 16:18:52
R W Run
8.98 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:51
R W Run
12.01 KB
2026-03-11 16:18:51
R W Run
17.11 KB
2026-03-11 16:18:51
R W Run
6.74 KB
2026-03-11 16:18:52
R W Run
30.93 KB
2026-03-11 16:18:51
R W Run
4.99 KB
2026-03-11 16:18:51
R W Run
4.25 KB
2026-03-11 16:18:51
R W Run
24.72 KB
2026-03-11 16:18:51
R W Run
29.96 KB
2026-03-11 16:18:52
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
160 KB
2026-03-11 16:18:51
R W Run
6.72 KB
2026-03-11 16:18:52
R W Run
10.92 KB
2026-03-11 16:18:51
R W Run
4.77 KB
2026-03-11 16:18:51
R W Run
3.38 KB
2026-03-11 16:18:51
R W Run
11.18 KB
2026-03-11 16:18:51
R W Run
62.19 KB
2026-03-11 16:18:51
R W Run
2.46 KB
2026-03-11 16:18:51
R W Run
9.17 KB
2026-03-11 16:18:51
R W Run
32.15 KB
2026-03-11 16:18:51
R W Run
34.05 KB
2026-03-11 16:18:52
R W Run
7.15 KB
2026-03-11 16:18:51
R W Run
3.47 KB
2026-03-11 16:18:52
R W Run
1.87 KB
2026-03-11 16:18:52
R W Run
30.91 KB
2026-03-11 16:18:51
R W Run
7.29 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:51
R W Run
12.54 KB
2026-03-11 16:18:51
R W Run
19.12 KB
2026-03-11 16:18:51
R W Run
18.12 KB
2026-03-11 16:18:52
R W Run
39.99 KB
2026-03-11 16:18:52
R W Run
5.17 KB
2026-03-11 16:18:52
R W Run
979 By
2026-03-11 16:18:51
R W Run
18.44 KB
2026-03-11 16:18:52
R W Run
10.24 KB
2026-03-11 16:18:51
R W Run
1.77 KB
2026-03-11 16:18:52
R W Run
34.9 KB
2026-03-11 16:18:51
R W Run
7.19 KB
2026-03-11 16:18:52
R W Run
160.5 KB
2026-03-11 16:18:51
R W Run
64.27 KB
2026-03-11 16:18:51
R W Run
27.95 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
2.94 KB
2026-03-11 16:18:51
R W Run
43.13 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
22.5 KB
2026-03-11 16:18:51
R W Run
13.01 KB
2026-03-11 16:18:52
R W Run
3.27 KB
2026-03-11 16:18:51
R W Run
18 KB
2026-03-11 16:18:51
R W Run
210.4 KB
2026-03-11 16:18:52
R W Run
25.86 KB
2026-03-11 16:18:52
R W Run
115.85 KB
2026-03-11 16:18:51
R W Run
373 By
2026-03-11 16:18:52
R W Run
343 By
2026-03-11 16:18:52
R W Run
338 By
2026-03-11 16:18:51
R W Run
100.73 KB
2026-03-11 16:18:52
R W Run
130.93 KB
2026-03-11 16:18:51
R W Run
19.1 KB
2026-03-11 16:18:51
R W Run
17.41 KB
2026-03-11 16:18:52
R W Run
41.98 KB
2026-03-11 16:18:52
R W Run
400 By
2026-03-11 16:18:52
R W Run
11.1 KB
2026-03-11 16:18:52
R W Run
37.02 KB
2026-03-11 16:18:51
R W Run
2.24 KB
2026-03-11 16:18:51
R W Run
188.13 KB
2026-03-11 16:18:51
R W Run
338 By
2026-03-11 16:18:51
R W Run
38 KB
2026-03-11 16:18:51
R W Run
4.02 KB
2026-03-11 16:18:52
R W Run
5.38 KB
2026-03-11 16:18:51
R W Run
3.05 KB
2026-03-11 16:18:52
R W Run
2.61 KB
2026-03-11 16:18:51
R W Run
1.16 KB
2026-03-11 16:18:52
R W Run
4.04 KB
2026-03-11 16:18:51
R W Run
3.71 KB
2026-03-11 16:18:51
R W Run
24.6 KB
2026-03-11 16:18:51
R W Run
9.56 KB
2026-03-11 16:18:51
R W Run
346.43 KB
2026-03-11 16:18:52
R W Run
281.84 KB
2026-03-11 16:18:52
R W Run
14.95 KB
2026-03-11 16:18:51
R W Run
8.44 KB
2026-03-11 16:18:52
R W Run
168.95 KB
2026-03-11 16:18:52
R W Run
20.71 KB
2026-03-11 16:18:52
R W Run
25.27 KB
2026-03-11 16:18:51
R W Run
5.72 KB
2026-03-11 16:18:51
R W Run
4.63 KB
2026-03-11 16:18:52
R W Run
81.73 KB
2026-03-11 16:18:51
R W Run
67.18 KB
2026-03-11 16:18:51
R W Run
156.36 KB
2026-03-11 16:18:52
R W Run
55.19 KB
2026-03-11 16:18:51
R W Run
162 By
2026-03-11 16:18:51
R W Run
61.72 KB
2026-03-11 16:18:51
R W Run
216.06 KB
2026-03-11 16:18:52
R W Run
65.09 KB
2026-03-11 16:18:51
R W Run
25.24 KB
2026-03-11 16:18:52
R W Run
4.81 KB
2026-03-11 16:18:51
R W Run
6.48 KB
2026-03-11 16:18:52
R W Run
21.25 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:52
R W Run
89.69 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.11 KB
2026-03-11 16:18:51
R W Run
40.74 KB
2026-03-11 16:18:51
R W Run
25.38 KB
2026-03-11 16:18:51
R W Run
43.31 KB
2026-03-11 16:18:52
R W Run
102.57 KB
2026-03-11 16:18:52
R W Run
6.18 KB
2026-03-11 16:18:51
R W Run
124.47 KB
2026-03-11 16:18:52
R W Run
35.65 KB
2026-03-11 16:18:52
R W Run
6.94 KB
2026-03-11 16:18:52
R W Run
67.04 KB
2026-03-11 16:18:52
R W Run
10.62 KB
2026-03-11 16:18:51
R W Run
289.35 KB
2026-03-11 16:18:52
R W Run
36.23 KB
2026-03-11 16:18:51
R W Run
200 By
2026-03-11 16:18:52
R W Run
200 By
2026-03-11 16:18:52
R W Run
98.29 KB
2026-03-11 16:18:52
R W Run
30.02 KB
2026-03-11 16:18:52
R W Run
19.03 KB
2026-03-11 16:18:52
R W Run
5.06 KB
2026-03-11 16:18:52
R W Run
255 By
2026-03-11 16:18:51
R W Run
22.66 KB
2026-03-11 16:18:52
R W Run
154.63 KB
2026-03-11 16:18:51
R W Run
9.68 KB
2026-03-11 16:18:51
R W Run
258 By
2026-03-11 16:18:51
R W Run
23.49 KB
2026-03-11 16:18:51
R W Run
3.16 KB
2026-03-11 16:18:51
R W Run
8.4 KB
2026-03-11 16:18:52
R W Run
441 By
2026-03-11 16:18:51
R W Run
7.39 KB
2026-03-11 16:18:51
R W Run
173 KB
2026-03-11 16:18:52
R W Run
544 By
2026-03-11 16:18:52
R W Run
4.17 KB
2026-03-11 16:18:51
R W Run
35.97 KB
2026-03-11 16:18:52
R W Run
1.69 KB
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:52
R W Run
6.09 KB
2026-03-11 16:18:51
R W Run
8.71 KB
2026-03-11 16:18:51
R W Run
131.84 KB
2026-03-11 16:18:51
R W Run
37.45 KB
2026-03-11 16:18:51
R W Run
173.89 KB
2026-03-11 16:18:51
R W Run
7.09 KB
2026-03-11 16:18:51
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
1.08 KB
2026-03-11 16:18:51
R W Run
69.46 KB
2026-03-11 16:18:52
R W Run
445 By
2026-03-11 16:18:51
R W Run
799 By
2026-03-11 16:18:52
R W Run
error_log
📄block-template.php
1<?php
2/**
3 * Block template loader functions.
4 *
5 * @package WordPress
6 */
7
8/**
9 * Adds necessary hooks to resolve '_wp-find-template' requests.
10 *
11 * @access private
12 * @since 5.9.0
13 */
14function _add_template_loader_filters() {
15 if ( isset( $_GET['_wp-find-template'] ) && current_theme_supports( 'block-templates' ) ) {
16 add_action( 'pre_get_posts', '_resolve_template_for_new_post' );
17 }
18}
19
20/**
21 * Renders a warning screen for empty block templates.
22 *
23 * @since 6.8.0
24 *
25 * @param WP_Block_Template $block_template The block template object.
26 * @return string The warning screen HTML.
27 */
28function wp_render_empty_block_template_warning( $block_template ) {
29 wp_enqueue_style( 'wp-empty-template-alert' );
30 return sprintf(
31 /* translators: %1$s: Block template title. %2$s: Empty template warning message. %3$s: Edit template link. %4$s: Edit template button label. */
32 '<div id="wp-empty-template-alert">
33 <h2>%1$s</h2>
34 <p>%2$s</p>
35 <a href="%3$s" class="wp-element-button">
36 %4$s
37 </a>
38 </div>',
39 esc_html( $block_template->title ),
40 __( 'This page is blank because the template is empty. You can reset or customize it in the Site Editor.' ),
41 get_edit_post_link( $block_template->wp_id, 'site-editor' ),
42 __( 'Edit template' )
43 );
44}
45
46/**
47 * Finds a block template with equal or higher specificity than a given PHP template file.
48 *
49 * Internally, this communicates the block content that needs to be used by the template canvas through a global variable.
50 *
51 * @since 5.8.0
52 * @since 6.3.0 Added `$_wp_current_template_id` global for editing of current template directly from the admin bar.
53 *
54 * @global string $_wp_current_template_content
55 * @global string $_wp_current_template_id
56 *
57 * @param string $template Path to the template. See locate_template().
58 * @param string $type Sanitized filename without extension.
59 * @param string[] $templates A list of template candidates, in descending order of priority.
60 * @return string The path to the Site Editor template canvas file, or the fallback PHP template.
61 */
62function locate_block_template( $template, $type, array $templates ) {
63 global $_wp_current_template_content, $_wp_current_template_id;
64
65 if ( ! current_theme_supports( 'block-templates' ) ) {
66 return $template;
67 }
68
69 if ( $template ) {
70 /*
71 * locate_template() has found a PHP template at the path specified by $template.
72 * That means that we have a fallback candidate if we cannot find a block template
73 * with higher specificity.
74 *
75 * Thus, before looking for matching block themes, we shorten our list of candidate
76 * templates accordingly.
77 */
78
79 // Locate the index of $template (without the theme directory path) in $templates.
80 $relative_template_path = str_replace(
81 array( get_stylesheet_directory() . '/', get_template_directory() . '/' ),
82 '',
83 $template
84 );
85 $index = array_search( $relative_template_path, $templates, true );
86
87 // If the template hierarchy algorithm has successfully located a PHP template file,
88 // we will only consider block templates with higher or equal specificity.
89 $templates = array_slice( $templates, 0, $index + 1 );
90 }
91
92 $block_template = resolve_block_template( $type, $templates, $template );
93
94 if ( $block_template ) {
95 $_wp_current_template_id = $block_template->id;
96
97 if ( empty( $block_template->content ) ) {
98 if ( is_user_logged_in() ) {
99 $_wp_current_template_content = wp_render_empty_block_template_warning( $block_template );
100 } else {
101 if ( $block_template->has_theme_file ) {
102 // Show contents from theme template if user is not logged in.
103 $theme_template = _get_block_template_file( 'wp_template', $block_template->slug );
104 $_wp_current_template_content = file_get_contents( $theme_template['path'] );
105 } else {
106 $_wp_current_template_content = $block_template->content;
107 }
108 }
109 } elseif ( ! empty( $block_template->content ) ) {
110 $_wp_current_template_content = $block_template->content;
111 }
112 if ( isset( $_GET['_wp-find-template'] ) ) {
113 wp_send_json_success( $block_template );
114 }
115 } else {
116 if ( $template ) {
117 return $template;
118 }
119
120 if ( 'index' === $type ) {
121 if ( isset( $_GET['_wp-find-template'] ) ) {
122 wp_send_json_error( array( 'message' => __( 'No matching template found.' ) ) );
123 }
124 } else {
125 return ''; // So that the template loader keeps looking for templates.
126 }
127 }
128
129 // Add hooks for template canvas.
130 // Add viewport meta tag.
131 add_action( 'wp_head', '_block_template_viewport_meta_tag', 0 );
132
133 // Render title tag with content, regardless of whether theme has title-tag support.
134 remove_action( 'wp_head', '_wp_render_title_tag', 1 ); // Remove conditional title tag rendering...
135 add_action( 'wp_head', '_block_template_render_title_tag', 1 ); // ...and make it unconditional.
136
137 // This file will be included instead of the theme's template file.
138 return ABSPATH . WPINC . '/template-canvas.php';
139}
140
141/**
142 * Returns the correct 'wp_template' to render for the request template type.
143 *
144 * @access private
145 * @since 5.8.0
146 * @since 5.9.0 Added the `$fallback_template` parameter.
147 *
148 * @param string $template_type The current template type.
149 * @param string[] $template_hierarchy The current template hierarchy, ordered by priority.
150 * @param string $fallback_template A PHP fallback template to use if no matching block template is found.
151 * @return WP_Block_Template|null template A template object, or null if none could be found.
152 */
153function resolve_block_template( $template_type, $template_hierarchy, $fallback_template ) {
154 if ( ! $template_type ) {
155 return null;
156 }
157
158 if ( empty( $template_hierarchy ) ) {
159 $template_hierarchy = array( $template_type );
160 }
161
162 $slugs = array_map(
163 '_strip_template_file_suffix',
164 $template_hierarchy
165 );
166
167 // Find all potential templates 'wp_template' post matching the hierarchy.
168 $query = array(
169 'slug__in' => $slugs,
170 );
171 $templates = get_block_templates( $query );
172
173 // Order these templates per slug priority.
174 // Build map of template slugs to their priority in the current hierarchy.
175 $slug_priorities = array_flip( $slugs );
176
177 usort(
178 $templates,
179 static function ( $template_a, $template_b ) use ( $slug_priorities ) {
180 return $slug_priorities[ $template_a->slug ] - $slug_priorities[ $template_b->slug ];
181 }
182 );
183
184 $theme_base_path = get_stylesheet_directory() . DIRECTORY_SEPARATOR;
185 $parent_theme_base_path = get_template_directory() . DIRECTORY_SEPARATOR;
186
187 // Is the active theme a child theme, and is the PHP fallback template part of it?
188 if (
189 str_starts_with( $fallback_template, $theme_base_path ) &&
190 ! str_contains( $fallback_template, $parent_theme_base_path )
191 ) {
192 $fallback_template_slug = substr(
193 $fallback_template,
194 // Starting position of slug.
195 strpos( $fallback_template, $theme_base_path ) + strlen( $theme_base_path ),
196 // Remove '.php' suffix.
197 -4
198 );
199
200 // Is our candidate block template's slug identical to our PHP fallback template's?
201 if (
202 count( $templates ) &&
203 $fallback_template_slug === $templates[0]->slug &&
204 'theme' === $templates[0]->source
205 ) {
206 // Unfortunately, we cannot trust $templates[0]->theme, since it will always
207 // be set to the active theme's slug by _build_block_template_result_from_file(),
208 // even if the block template is really coming from the active theme's parent.
209 // (The reason for this is that we want it to be associated with the active theme
210 // -- not its parent -- once we edit it and store it to the DB as a wp_template CPT.)
211 // Instead, we use _get_block_template_file() to locate the block template file.
212 $template_file = _get_block_template_file( 'wp_template', $fallback_template_slug );
213 if ( $template_file && get_template() === $template_file['theme'] ) {
214 // The block template is part of the parent theme, so we
215 // have to give precedence to the child theme's PHP template.
216 array_shift( $templates );
217 }
218 }
219 }
220
221 return count( $templates ) ? $templates[0] : null;
222}
223
224/**
225 * Displays title tag with content, regardless of whether theme has title-tag support.
226 *
227 * @access private
228 * @since 5.8.0
229 *
230 * @see _wp_render_title_tag()
231 */
232function _block_template_render_title_tag() {
233 echo '<title>' . wp_get_document_title() . '</title>' . "\n";
234}
235
236/**
237 * Returns the markup for the current template.
238 *
239 * @access private
240 * @since 5.8.0
241 *
242 * @global string $_wp_current_template_id
243 * @global string $_wp_current_template_content
244 * @global WP_Embed $wp_embed WordPress Embed object.
245 * @global WP_Query $wp_query WordPress Query object.
246 *
247 * @return string Block template markup.
248 */
249function get_the_block_template_html() {
250 global $_wp_current_template_id, $_wp_current_template_content, $wp_embed, $wp_query;
251
252 if ( ! $_wp_current_template_content ) {
253 if ( is_user_logged_in() ) {
254 return '<h1>' . esc_html__( 'No matching template found' ) . '</h1>';
255 }
256 return '';
257 }
258
259 $content = $wp_embed->run_shortcode( $_wp_current_template_content );
260 $content = $wp_embed->autoembed( $content );
261 $content = shortcode_unautop( $content );
262 $content = do_shortcode( $content );
263
264 /*
265 * Most block themes omit the `core/query` and `core/post-template` blocks in their singular content templates.
266 * While this technically still works since singular content templates are always for only one post, it results in
267 * the main query loop never being entered which causes bugs in core and the plugin ecosystem.
268 *
269 * The workaround below ensures that the loop is started even for those singular templates. The while loop will by
270 * definition only go through a single iteration, i.e. `do_blocks()` is only called once. Additional safeguard
271 * checks are included to ensure the main query loop has not been tampered with and really only encompasses a
272 * single post.
273 *
274 * Even if the block template contained a `core/query` and `core/post-template` block referencing the main query
275 * loop, it would not cause errors since it would use a cloned instance and go through the same loop of a single
276 * post, within the actual main query loop.
277 *
278 * This special logic should be skipped if the current template does not come from the current theme, in which case
279 * it has been injected by a plugin by hijacking the block template loader mechanism. In that case, entirely custom
280 * logic may be applied which is unpredictable and therefore safer to omit this special handling on.
281 */
282 if (
283 $_wp_current_template_id &&
284 str_starts_with( $_wp_current_template_id, get_stylesheet() . '//' ) &&
285 is_singular() &&
286 1 === $wp_query->post_count &&
287 have_posts()
288 ) {
289 while ( have_posts() ) {
290 the_post();
291 $content = do_blocks( $content );
292 }
293 } else {
294 $content = do_blocks( $content );
295 }
296
297 $content = wptexturize( $content );
298 $content = convert_smilies( $content );
299 $content = wp_filter_content_tags( $content, 'template' );
300 $content = str_replace( ']]>', ']]&gt;', $content );
301
302 // Wrap block template in .wp-site-blocks to allow for specific descendant styles
303 // (e.g. `.wp-site-blocks > *`).
304 return '<div class="wp-site-blocks">' . $content . '</div>';
305}
306
307/**
308 * Renders a 'viewport' meta tag.
309 *
310 * This is hooked into {@see 'wp_head'} to decouple its output from the default template canvas.
311 *
312 * @access private
313 * @since 5.8.0
314 */
315function _block_template_viewport_meta_tag() {
316 echo '<meta name="viewport" content="width=device-width, initial-scale=1" />' . "\n";
317}
318
319/**
320 * Strips .php or .html suffix from template file names.
321 *
322 * @access private
323 * @since 5.8.0
324 *
325 * @param string $template_file Template file name.
326 * @return string Template file name without extension.
327 */
328function _strip_template_file_suffix( $template_file ) {
329 return preg_replace( '/\.(php|html)$/', '', $template_file );
330}
331
332/**
333 * Removes post details from block context when rendering a block template.
334 *
335 * @access private
336 * @since 5.8.0
337 *
338 * @param array $context Default context.
339 *
340 * @return array Filtered context.
341 */
342function _block_template_render_without_post_block_context( $context ) {
343 /*
344 * When loading a template directly and not through a page that resolves it,
345 * the top-level post ID and type context get set to that of the template.
346 * Templates are just the structure of a site, and they should not be available
347 * as post context because blocks like Post Content would recurse infinitely.
348 */
349 if ( isset( $context['postType'] ) && 'wp_template' === $context['postType'] ) {
350 unset( $context['postId'] );
351 unset( $context['postType'] );
352 }
353
354 return $context;
355}
356
357/**
358 * Sets the current WP_Query to return auto-draft posts.
359 *
360 * The auto-draft status indicates a new post, so allow the the WP_Query instance to
361 * return an auto-draft post for template resolution when editing a new post.
362 *
363 * @access private
364 * @since 5.9.0
365 *
366 * @param WP_Query $wp_query Current WP_Query instance, passed by reference.
367 */
368function _resolve_template_for_new_post( $wp_query ) {
369 if ( ! $wp_query->is_main_query() ) {
370 return;
371 }
372
373 remove_filter( 'pre_get_posts', '_resolve_template_for_new_post' );
374
375 // Pages.
376 $page_id = isset( $wp_query->query['page_id'] ) ? $wp_query->query['page_id'] : null;
377
378 // Posts, including custom post types.
379 $p = isset( $wp_query->query['p'] ) ? $wp_query->query['p'] : null;
380
381 $post_id = $page_id ? $page_id : $p;
382 $post = get_post( $post_id );
383
384 if (
385 $post &&
386 'auto-draft' === $post->post_status &&
387 current_user_can( 'edit_post', $post->ID )
388 ) {
389 $wp_query->set( 'post_status', 'auto-draft' );
390 }
391}
392
393/**
394 * Register a block template.
395 *
396 * @since 6.7.0
397 *
398 * @param string $template_name Template name in the form of `plugin_uri//template_name`.
399 * @param array|string $args {
400 * @type string $title Optional. Title of the template as it will be shown in the Site Editor
401 * and other UI elements.
402 * @type string $description Optional. Description of the template as it will be shown in the Site
403 * Editor.
404 * @type string $content Optional. Default content of the template that will be used when the
405 * template is rendered or edited in the editor.
406 * @type string[] $post_types Optional. Array of post types to which the template should be available.
407 * @type string $plugin Optional. Slug of the plugin that registers the template.
408 * }
409 * @return WP_Block_Template|WP_Error The registered template object on success, WP_Error object on failure.
410 */
411function register_block_template( $template_name, $args = array() ) {
412 return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args );
413}
414
415/**
416 * Unregister a block template.
417 *
418 * @since 6.7.0
419 *
420 * @param string $template_name Template name in the form of `plugin_uri//template_name`.
421 * @return WP_Block_Template|WP_Error The unregistered template object on success, WP_Error object on failure or if the
422 * template doesn't exist.
423 */
424function unregister_block_template( $template_name ) {
425 return WP_Block_Templates_Registry::get_instance()->unregister( $template_name );
426}
427
Ui Ux Design – Teachers Night Out https://cardgames4educators.com Wed, 16 Oct 2024 22:24:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://cardgames4educators.com/wp-content/uploads/2024/06/cropped-Card-4-Educators-logo-32x32.png Ui Ux Design – Teachers Night Out https://cardgames4educators.com 32 32 Masters In English How English Speaker https://cardgames4educators.com/masters-in-english-how-english-speaker/ https://cardgames4educators.com/masters-in-english-how-english-speaker/#comments Mon, 27 May 2024 08:54:45 +0000 https://themexriver.com/wp/kadu/?p=1

Erat himenaeos neque id sagittis massa. Hac suscipit pulvinar dignissim platea magnis eu. Don tellus a pharetra inceptos efficitur dui pulvinar. Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent pulvinar odio volutpat parturient. Quisque risus finibus suspendisse mus purus magnis facilisi condimentum consectetur dui. Curae elit suspendisse cursus vehicula.

Turpis taciti class non vel pretium quis pulvinar tempor lobortis nunc. Libero phasellus parturient sapien volutpat malesuada ornare. Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae. Porta est tempor ex eget feugiat vulputate ipsum. Justo nec iaculis habitant diam arcu fermentum.

We offer comprehen sive emplo ment services such as assistance wit employer compliance.Our company is your strategic HR partner as instead of HR. john smithson

Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae.

Exploring Learning Landscapes in Academic

Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent.

]]>
https://cardgames4educators.com/masters-in-english-how-english-speaker/feed/ 1