run: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:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
17.74 KB
2026-03-11 16:18:51
R W Run
5.03 KB
2026-03-11 16:18:51
R W Run
2.77 KB
2026-03-11 16:18:51
R W Run
479 By
2026-03-11 16:18:51
R W Run
9.12 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
12.35 KB
2026-03-11 16:18:51
R W Run
5.47 KB
2026-03-11 16:18:51
R W Run
10.09 KB
2026-03-11 16:18:51
R W Run
11.35 KB
2026-03-11 16:18:51
R W Run
5.86 KB
2026-03-11 16:18:51
R W Run
4.38 KB
2026-03-11 16:18:51
R W Run
489 By
2026-03-11 16:18:51
R W Run
499 By
2026-03-11 16:18:51
R W Run
11.01 KB
2026-03-11 16:18:51
R W Run
14.38 KB
2026-03-11 16:18:51
R W Run
28.83 KB
2026-03-11 16:18:51
R W Run
14.6 KB
2026-03-11 16:18:51
R W Run
8.34 KB
2026-03-11 16:18:51
R W Run
6.21 KB
2026-03-11 16:18:51
R W Run
10.44 KB
2026-03-11 16:18:51
R W Run
22 KB
2026-03-11 16:18:51
R W Run
19.48 KB
2026-03-11 16:18:51
R W Run
7.33 KB
2026-03-11 16:18:51
R W Run
7.75 KB
2026-03-11 16:18:51
R W Run
11.02 KB
2026-03-11 16:18:51
R W Run
4.8 KB
2026-03-11 16:18:51
R W Run
7.58 KB
2026-03-11 16:18:51
R W Run
7.68 KB
2026-03-11 16:18:51
R W Run
6.8 KB
2026-03-11 16:18:51
R W Run
17.77 KB
2026-03-11 16:18:51
R W Run
934 By
2026-03-11 16:18:51
R W Run
4.26 KB
2026-03-11 16:18:51
R W Run
2.72 KB
2026-03-11 16:18:51
R W Run
2.89 KB
2026-03-11 16:18:51
R W Run
2.02 KB
2026-03-11 16:18:51
R W Run
2.92 KB
2026-03-11 16:18:51
R W Run
3.2 KB
2026-03-11 16:18:51
R W Run
3.58 KB
2026-03-11 16:18:51
R W Run
819 By
2026-03-11 16:18:51
R W Run
9.82 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
307 By
2026-03-11 16:18:51
R W Run
196 By
2026-03-11 16:18:51
R W Run
4.5 KB
2026-03-11 16:18:51
R W Run
216 By
2026-03-11 16:18:51
R W Run
229 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
217 By
2026-03-11 16:18:51
R W Run
219 By
2026-03-11 16:18:51
R W Run
215 By
2026-03-11 16:18:51
R W Run
4.74 KB
2026-03-11 16:18:51
R W Run
48.19 KB
2026-03-11 16:18:51
R W Run
5.39 KB
2026-03-11 16:18:51
R W Run
15.92 KB
2026-03-11 16:18:51
R W Run
21.65 KB
2026-03-11 16:18:51
R W Run
621 By
2026-03-11 16:18:51
R W Run
6.38 KB
2026-03-11 16:18:51
R W Run
21.22 KB
2026-03-11 16:18:51
R W Run
9.95 KB
2026-03-11 16:18:51
R W Run
9.94 KB
2026-03-11 16:18:51
R W Run
9.1 KB
2026-03-11 16:18:51
R W Run
13.6 KB
2026-03-11 16:18:51
R W Run
13.75 KB
2026-03-11 16:18:51
R W Run
6.96 KB
2026-03-11 16:18:51
R W Run
30 KB
2026-03-11 16:18:51
R W Run
2.7 KB
2026-03-11 16:18:51
R W Run
10.03 KB
2026-03-11 16:18:51
R W Run
2.34 KB
2026-03-11 16:18:51
R W Run
3.67 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:51
R W Run
283 By
2026-03-11 16:18:51
R W Run
5.7 KB
2026-03-11 16:18:51
R W Run
17.48 KB
2026-03-11 16:18:51
R W Run
11.98 KB
2026-03-11 16:18:51
R W Run
3.99 KB
2026-03-11 16:18:51
R W Run
10.2 KB
2026-03-11 16:18:51
R W Run
2.2 KB
2026-03-11 16:18:51
R W Run
16.87 KB
2026-03-11 16:18:51
R W Run
23.38 KB
2026-03-11 16:18:51
R W Run
47.92 KB
2026-03-11 16:18:51
R W Run
3.43 KB
2026-03-11 16:18:51
R W Run
45.45 KB
2026-03-11 16:18:51
R W Run
12.79 KB
2026-03-11 16:18:51
R W Run
341 By
2026-03-11 16:18:51
R W Run
6.27 KB
2026-03-11 16:18:51
R W Run
14.9 KB
2026-03-11 16:18:51
R W Run
40.36 KB
2026-03-11 16:18:51
R W Run
24.05 KB
2026-03-11 16:18:51
R W Run
23.29 KB
2026-03-11 16:18:51
R W Run
5.12 KB
2026-03-11 16:18:51
R W Run
19.29 KB
2026-03-11 16:18:51
R W Run
1.09 KB
2026-03-11 16:18:51
R W Run
error_log
📄site-editor.php
1<?php
2/**
3 * Site Editor administration screen.
4 *
5 * @package WordPress
6 * @subpackage Administration
7 */
8
9global $editor_styles;
10
11/** WordPress Administration Bootstrap */
12require_once __DIR__ . '/admin.php';
13
14if ( ! current_user_can( 'edit_theme_options' ) ) {
15 wp_die(
16 '<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
17 '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
18 403
19 );
20}
21
22/**
23 * Maps old site editor urls to the new updated ones.
24 *
25 * @since 6.8.0
26 * @access private
27 *
28 * @global string $pagenow The filename of the current screen.
29 *
30 * @return string|false The new URL to redirect to, or false if no redirection is needed.
31 */
32function _wp_get_site_editor_redirection_url() {
33 global $pagenow;
34 if ( 'site-editor.php' !== $pagenow || isset( $_REQUEST['p'] ) || empty( $_SERVER['QUERY_STRING'] ) ) {
35 return false;
36 }
37
38 // The following redirects are for the new permalinks in the site editor.
39 if ( isset( $_REQUEST['postType'] ) && 'wp_navigation' === $_REQUEST['postType'] && ! empty( $_REQUEST['postId'] ) ) {
40 return add_query_arg( array( 'p' => '/wp_navigation/' . $_REQUEST['postId'] ), remove_query_arg( array( 'postType', 'postId' ) ) );
41 }
42
43 if ( isset( $_REQUEST['postType'] ) && 'wp_navigation' === $_REQUEST['postType'] && empty( $_REQUEST['postId'] ) ) {
44 return add_query_arg( array( 'p' => '/navigation' ), remove_query_arg( 'postType' ) );
45 }
46
47 if ( isset( $_REQUEST['path'] ) && '/wp_global_styles' === $_REQUEST['path'] ) {
48 return add_query_arg( array( 'p' => '/styles' ), remove_query_arg( 'path' ) );
49 }
50
51 if ( isset( $_REQUEST['postType'] ) && 'page' === $_REQUEST['postType'] && ( empty( $_REQUEST['canvas'] ) || empty( $_REQUEST['postId'] ) ) ) {
52 return add_query_arg( array( 'p' => '/page' ), remove_query_arg( 'postType' ) );
53 }
54
55 if ( isset( $_REQUEST['postType'] ) && 'page' === $_REQUEST['postType'] && ! empty( $_REQUEST['postId'] ) ) {
56 return add_query_arg( array( 'p' => '/page/' . $_REQUEST['postId'] ), remove_query_arg( array( 'postType', 'postId' ) ) );
57 }
58
59 if ( isset( $_REQUEST['postType'] ) && 'wp_template' === $_REQUEST['postType'] && ( empty( $_REQUEST['canvas'] ) || empty( $_REQUEST['postId'] ) ) ) {
60 return add_query_arg( array( 'p' => '/template' ), remove_query_arg( 'postType' ) );
61 }
62
63 if ( isset( $_REQUEST['postType'] ) && 'wp_template' === $_REQUEST['postType'] && ! empty( $_REQUEST['postId'] ) ) {
64 return add_query_arg( array( 'p' => '/wp_template/' . $_REQUEST['postId'] ), remove_query_arg( array( 'postType', 'postId' ) ) );
65 }
66
67 if ( isset( $_REQUEST['postType'] ) && 'wp_block' === $_REQUEST['postType'] && ( empty( $_REQUEST['canvas'] ) || empty( $_REQUEST['postId'] ) ) ) {
68 return add_query_arg( array( 'p' => '/pattern' ), remove_query_arg( 'postType' ) );
69 }
70
71 if ( isset( $_REQUEST['postType'] ) && 'wp_block' === $_REQUEST['postType'] && ! empty( $_REQUEST['postId'] ) ) {
72 return add_query_arg( array( 'p' => '/wp_block/' . $_REQUEST['postId'] ), remove_query_arg( array( 'postType', 'postId' ) ) );
73 }
74
75 if ( isset( $_REQUEST['postType'] ) && 'wp_template_part' === $_REQUEST['postType'] && ( empty( $_REQUEST['canvas'] ) || empty( $_REQUEST['postId'] ) ) ) {
76 return add_query_arg( array( 'p' => '/pattern' ) );
77 }
78
79 if ( isset( $_REQUEST['postType'] ) && 'wp_template_part' === $_REQUEST['postType'] && ! empty( $_REQUEST['postId'] ) ) {
80 return add_query_arg( array( 'p' => '/wp_template_part/' . $_REQUEST['postId'] ), remove_query_arg( array( 'postType', 'postId' ) ) );
81 }
82
83 // The following redirects are for backward compatibility with the old site editor URLs.
84 if ( isset( $_REQUEST['path'] ) && '/wp_template_part/all' === $_REQUEST['path'] ) {
85 return add_query_arg(
86 array(
87 'p' => '/pattern',
88 'postType' => 'wp_template_part',
89 ),
90 remove_query_arg( 'path' )
91 );
92 }
93
94 if ( isset( $_REQUEST['path'] ) && '/page' === $_REQUEST['path'] ) {
95 return add_query_arg( array( 'p' => '/page' ), remove_query_arg( 'path' ) );
96 }
97
98 if ( isset( $_REQUEST['path'] ) && '/wp_template' === $_REQUEST['path'] ) {
99 return add_query_arg( array( 'p' => '/template' ), remove_query_arg( 'path' ) );
100 }
101
102 if ( isset( $_REQUEST['path'] ) && '/patterns' === $_REQUEST['path'] ) {
103 return add_query_arg( array( 'p' => '/pattern' ), remove_query_arg( 'path' ) );
104 }
105
106 if ( isset( $_REQUEST['path'] ) && '/navigation' === $_REQUEST['path'] ) {
107 return add_query_arg( array( 'p' => '/navigation' ), remove_query_arg( 'path' ) );
108 }
109
110 return add_query_arg( array( 'p' => '/' ) );
111}
112
113// Redirect to the site editor to the new URLs if needed.
114$redirection = _wp_get_site_editor_redirection_url();
115if ( false !== $redirection ) {
116 wp_safe_redirect( $redirection );
117 exit;
118}
119
120// Used in the HTML title tag.
121$title = _x( 'Editor', 'site editor title tag' );
122$parent_file = 'themes.php';
123
124// Flag that we're loading the block editor.
125$current_screen = get_current_screen();
126$current_screen->is_block_editor( true );
127
128// Default to is-fullscreen-mode to avoid jumps in the UI.
129add_filter(
130 'admin_body_class',
131 static function ( $classes ) {
132 return "$classes is-fullscreen-mode";
133 }
134);
135
136$indexed_template_types = array();
137foreach ( get_default_block_template_types() as $slug => $template_type ) {
138 $template_type['slug'] = (string) $slug;
139 $indexed_template_types[] = $template_type;
140}
141
142$context_settings = array( 'name' => 'core/edit-site' );
143
144if ( ! empty( $_GET['postId'] ) && is_numeric( $_GET['postId'] ) ) {
145 $context_settings['post'] = get_post( (int) $_GET['postId'] );
146} elseif ( isset( $_GET['p'] ) && preg_match( '/^\/page\/(\d+)$/', $_GET['p'], $matches ) ) {
147 $context_settings['post'] = get_post( (int) $matches[1] );
148}
149
150$block_editor_context = new WP_Block_Editor_Context( $context_settings );
151$custom_settings = array(
152 'siteUrl' => site_url(),
153 'postsPerPage' => get_option( 'posts_per_page' ),
154 'styles' => get_block_editor_theme_styles(),
155 'defaultTemplateTypes' => $indexed_template_types,
156 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
157 'supportsLayout' => wp_theme_has_theme_json(),
158 'supportsTemplatePartsMode' => ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ),
159);
160
161// Add additional back-compat patterns registered by `current_screen` et al.
162$custom_settings['__experimentalAdditionalBlockPatterns'] = WP_Block_Patterns_Registry::get_instance()->get_all_registered( true );
163$custom_settings['__experimentalAdditionalBlockPatternCategories'] = WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true );
164
165$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );
166
167if ( isset( $_GET['postType'] ) && ! isset( $_GET['postId'] ) ) {
168 $post_type = get_post_type_object( $_GET['postType'] );
169 if ( ! $post_type ) {
170 wp_die( __( 'Invalid post type.' ) );
171 }
172}
173
174$active_global_styles_id = WP_Theme_JSON_Resolver::get_user_global_styles_post_id();
175$active_theme = get_stylesheet();
176
177$navigation_rest_route = rest_get_route_for_post_type_items(
178 'wp_navigation'
179);
180
181$preload_paths = array(
182 array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
183 array( rest_get_route_for_post_type_items( 'page' ), 'OPTIONS' ),
184 '/wp/v2/types?context=view',
185 '/wp/v2/types/wp_template?context=edit',
186 '/wp/v2/types/wp_template_part?context=edit',
187 '/wp/v2/templates?context=edit&per_page=-1',
188 '/wp/v2/template-parts?context=edit&per_page=-1',
189 '/wp/v2/themes?context=edit&status=active',
190 '/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
191 array( '/wp/v2/global-styles/' . $active_global_styles_id, 'OPTIONS' ),
192 '/wp/v2/global-styles/themes/' . $active_theme . '?context=view',
193 '/wp/v2/global-styles/themes/' . $active_theme . '/variations?context=view',
194 array( $navigation_rest_route, 'OPTIONS' ),
195 array(
196 add_query_arg(
197 array(
198 'context' => 'edit',
199 'per_page' => 100,
200 'order' => 'desc',
201 'orderby' => 'date',
202 // array indices are required to avoid query being encoded and not matching in cache.
203 'status[0]' => 'publish',
204 'status[1]' => 'draft',
205 ),
206 $navigation_rest_route
207 ),
208 'GET',
209 ),
210 '/wp/v2/settings',
211 array( '/wp/v2/settings', 'OPTIONS' ),
212 // Used by getBlockPatternCategories in useBlockEditorSettings.
213 '/wp/v2/block-patterns/categories',
214 // @see packages/core-data/src/entities.js
215 '/?_fields=' . implode(
216 ',',
217 array(
218 'description',
219 'gmt_offset',
220 'home',
221 'name',
222 'site_icon',
223 'site_icon_url',
224 'site_logo',
225 'timezone_string',
226 'url',
227 'page_for_posts',
228 'page_on_front',
229 'show_on_front',
230 )
231 ),
232);
233
234if ( $block_editor_context->post ) {
235 $route_for_post = rest_get_route_for_post( $block_editor_context->post );
236 if ( $route_for_post ) {
237 $preload_paths[] = add_query_arg( 'context', 'edit', $route_for_post );
238 if ( 'page' === $block_editor_context->post->post_type ) {
239 $preload_paths[] = add_query_arg(
240 'slug',
241 // @see https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254
242 empty( $block_editor_context->post->post_name ) ? 'page' : 'page-' . $block_editor_context->post->post_name,
243 '/wp/v2/templates/lookup'
244 );
245 }
246 }
247} else {
248 $preload_paths[] = '/wp/v2/templates/lookup?slug=front-page';
249 $preload_paths[] = '/wp/v2/templates/lookup?slug=home';
250}
251
252block_editor_rest_api_preload( $preload_paths, $block_editor_context );
253
254wp_add_inline_script(
255 'wp-edit-site',
256 sprintf(
257 'wp.domReady( function() {
258 wp.editSite.initializeEditor( "site-editor", %s );
259 } );',
260 wp_json_encode( $editor_settings, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
261 )
262);
263
264// Preload server-registered block schemas.
265wp_add_inline_script(
266 'wp-blocks',
267 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ');'
268);
269
270// Preload server-registered block bindings sources.
271$registered_sources = get_all_registered_block_bindings_sources();
272if ( ! empty( $registered_sources ) ) {
273 $filtered_sources = array();
274 foreach ( $registered_sources as $source ) {
275 $filtered_sources[] = array(
276 'name' => $source->name,
277 'label' => $source->label,
278 'usesContext' => $source->uses_context,
279 );
280 }
281 $script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
282 wp_add_inline_script(
283 'wp-blocks',
284 $script
285 );
286}
287
288wp_add_inline_script(
289 'wp-blocks',
290 sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( isset( $editor_settings['blockCategories'] ) ? $editor_settings['blockCategories'] : array(), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ),
291 'after'
292);
293
294wp_enqueue_script( 'wp-edit-site' );
295wp_enqueue_script( 'wp-format-library' );
296wp_enqueue_style( 'wp-edit-site' );
297wp_enqueue_style( 'wp-format-library' );
298wp_enqueue_media();
299
300if (
301 current_theme_supports( 'wp-block-styles' ) &&
302 ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 )
303) {
304 wp_enqueue_style( 'wp-block-library-theme' );
305}
306
307/** This action is documented in wp-admin/edit-form-blocks.php */
308do_action( 'enqueue_block_editor_assets' );
309
310require_once ABSPATH . 'wp-admin/admin-header.php';
311?>
312
313<div class="edit-site" id="site-editor">
314 <?php // JavaScript is disabled. ?>
315 <div class="wrap hide-if-js site-editor-no-js">
316 <h1 class="wp-heading-inline"><?php _e( 'Edit Site' ); ?></h1>
317 <?php
318 /**
319 * Filters the message displayed in the site editor interface when JavaScript is
320 * not enabled in the browser.
321 *
322 * @since 6.3.0
323 *
324 * @param string $message The message being displayed.
325 * @param WP_Post $post The post being edited.
326 */
327 $message = apply_filters( 'site_editor_no_javascript_message', __( 'The site editor requires JavaScript. Please enable JavaScript in your browser settings.' ), $post );
328 wp_admin_notice(
329 $message,
330 array(
331 'type' => 'error',
332 'additional_classes' => array( 'hide-if-js' ),
333 )
334 );
335 ?>
336 </div>
337</div>
338
339<?php
340
341require_once ABSPATH . 'wp-admin/admin-footer.php';
342
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.