Changeset 56629 for trunk/src/wp-includes/block-editor.php
- Timestamp:
- 09/20/2023 01:24:32 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-editor.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-editor.php
r56500 r56629 410 410 * 411 411 * @since 6.3.0 412 * @since 6.4.0 Return null if there is no post content block. 412 413 * @access private 413 414 * 414 415 * @global int $post_ID 415 416 * 416 * @return array Post Content block attributes or empty array if they don't exist.417 * @return array|null Post Content block attributes array or null if Post Content block doesn't exist. 417 418 */ 418 419 function wp_get_post_content_block_attributes() { … … 422 423 423 424 if ( ! $is_block_theme || ! $post_ID ) { 424 return array();425 return null; 425 426 } 426 427 … … 458 459 $post_content_block = wp_get_first_block( $template_blocks, 'core/post-content' ); 459 460 460 if ( ! empty( $post_content_block['attrs'] ) ) {461 if ( isset( $post_content_block['attrs'] ) ) { 461 462 return $post_content_block['attrs']; 462 463 } 463 464 } 464 465 465 return array();466 return null; 466 467 } 467 468 … … 636 637 $post_content_block_attributes = wp_get_post_content_block_attributes(); 637 638 638 if ( ! empty( $post_content_block_attributes ) ) {639 if ( isset( $post_content_block_attributes ) ) { 639 640 $editor_settings['postContentAttributes'] = $post_content_block_attributes; 640 641 }
Note: See TracChangeset
for help on using the changeset viewer.