Changeset 51894 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 10/06/2021 06:47:09 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r51888 r51894 814 814 function render_block( $parsed_block ) { 815 815 global $post; 816 $parent_block = null; 816 817 817 818 /** … … 820 821 * @since 5.1.0 821 822 * 822 * @param string|null $pre_render The pre-rendered content. Default null. 823 * @param array $parsed_block The block being rendered. 823 * @param string|null $pre_render The pre-rendered content. Default null. 824 * @param array $parsed_block The block being rendered. 825 * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block. 824 826 */ 825 $pre_render = apply_filters( 'pre_render_block', null, $parsed_block );827 $pre_render = apply_filters( 'pre_render_block', null, $parsed_block, $parent_block ); 826 828 if ( ! is_null( $pre_render ) ) { 827 829 return $pre_render; … … 835 837 * @since 5.1.0 836 838 * 837 * @param array $parsed_block The block being rendered. 838 * @param array $source_block An un-modified copy of $parsed_block, as it appeared in the source content. 839 * @param array $parsed_block The block being rendered. 840 * @param array $source_block An un-modified copy of $parsed_block, as it appeared in the source content. 841 * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block. 839 842 */ 840 $parsed_block = apply_filters( 'render_block_data', $parsed_block, $source_block );843 $parsed_block = apply_filters( 'render_block_data', $parsed_block, $source_block, $parent_block ); 841 844 842 845 $context = array(); … … 859 862 * @since 5.5.0 860 863 * 861 * @param array $context Default context. 862 * @param array $parsed_block Block being rendered, filtered by `render_block_data`. 864 * @param array $context Default context. 865 * @param array $parsed_block Block being rendered, filtered by `render_block_data`. 866 * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block. 863 867 */ 864 $context = apply_filters( 'render_block_context', $context, $parsed_block );868 $context = apply_filters( 'render_block_context', $context, $parsed_block, $parent_block ); 865 869 866 870 $block = new WP_Block( $parsed_block, $context );
Note: See TracChangeset
for help on using the changeset viewer.