Changeset 56970 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 10/18/2023 07:30:40 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r56960 r56970 1063 1063 } 1064 1064 1065 $block_content .= traverse_and_serialize_block( $inner_block, $pre_callback, $post_callback );1066 1067 1065 if ( is_callable( $post_callback ) ) { 1068 1066 $next = count( $block['innerBlocks'] ) - 1 === $block_index … … 1070 1068 : $block['innerBlocks'][ $block_index + 1 ]; 1071 1069 1072 $ block_content .= call_user_func_array(1070 $post_markup = call_user_func_array( 1073 1071 $post_callback, 1074 1072 array( &$inner_block, $block, $next ) 1075 1073 ); 1076 1074 } 1075 1076 $block_content .= traverse_and_serialize_block( $inner_block, $pre_callback, $post_callback ); 1077 $block_content .= isset( $post_markup ) ? $post_markup : ''; 1078 1077 1079 ++$block_index; 1078 1080 } … … 1136 1138 } 1137 1139 1138 $result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback );1139 1140 1140 if ( is_callable( $post_callback ) ) { 1141 1141 $next = count( $blocks ) - 1 === $index … … 1143 1143 : $blocks[ $index + 1 ]; 1144 1144 1145 $ result .= call_user_func_array(1145 $post_markup = call_user_func_array( 1146 1146 $post_callback, 1147 1147 array( &$block, null, $next ) // At the top level, there is no parent block to pass to the callback. 1148 1148 ); 1149 1149 } 1150 1151 $result .= traverse_and_serialize_block( $block, $pre_callback, $post_callback ); 1152 $result .= isset( $post_markup ) ? $post_markup : ''; 1150 1153 } 1151 1154
Note: See TracChangeset
for help on using the changeset viewer.