Changeset 53056 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 04/03/2022 11:43:07 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r53052 r53056 1070 1070 1071 1071 /** 1072 * Replace hrefs of attachment anchors with up-to-date permalinks.1072 * Replaces hrefs of attachment anchors with up-to-date permalinks. 1073 1073 * 1074 1074 * @since 2.3.0 … … 1362 1362 */ 1363 1363 $classes = apply_filters( "postbox_classes_{$screen_id}_{$box_id}", $classes ); 1364 1364 1365 return implode( ' ', $classes ); 1365 1366 } … … 2337 2338 } 2338 2339 2339 /* *2340 /* 2340 2341 * Sadly we probably cannot add this data directly into editor settings. 2341 2342 * 2342 * Some meta boxes need admin_headto fire for meta box registry.2343 * admin_head fires after admin_enqueue_scripts, which is where we create our2344 * editor instance.2343 * Some meta boxes need `admin_head` to fire for meta box registry. 2344 * `admin_head` fires after `admin_enqueue_scripts`, which is where we create 2345 * our editor instance. 2345 2346 */ 2346 2347 $script = 'window._wpLoadBlockEditor.then( function() { … … 2350 2351 wp_add_inline_script( 'wp-edit-post', $script ); 2351 2352 2352 /** 2353 * When `wp-edit-post` is output in the `<head>`, the inline script needs to be manually printed. Otherwise, 2354 * meta boxes will not display because inline scripts for `wp-edit-post` will not be printed again after this point. 2353 /* 2354 * When `wp-edit-post` is output in the `<head>`, the inline script needs to be manually printed. 2355 * Otherwise, meta boxes will not display because inline scripts for `wp-edit-post` 2356 * will not be printed again after this point. 2355 2357 */ 2356 2358 if ( wp_script_is( 'wp-edit-post', 'done' ) ) { … … 2358 2360 } 2359 2361 2360 /* *2361 * If the 'postcustom' meta box is enabled, then we need to perform some2362 * extra initialization on it.2362 /* 2363 * If the 'postcustom' meta box is enabled, then we need to perform 2364 * some extra initialization on it. 2363 2365 */ 2364 2366 $enable_custom_fields = (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ); 2367 2365 2368 if ( $enable_custom_fields ) { 2366 2369 $script = "( function( $ ) { … … 2406 2409 2407 2410 /* 2408 * Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards 2409 * compatibility, we can capture the output from these actions, and extract the hidden input fields. 2411 * Some meta boxes hook into these actions to add hidden input fields in the classic post form. 2412 * For backward compatibility, we can capture the output from these actions, 2413 * and extract the hidden input fields. 2410 2414 */ 2411 2415 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.