WordPress.org

Make WordPress Core

Ticket #46187: 46187-2.diff

File 46187-2.diff, 1.0 KB (added by manzoorwani.jk, 5 months ago)
  • wp-includes/class-wp-block.php

     
    241241                 * @param string $block_content The block content about to be appended.
    242242                 * @param array  $block         The full block, including name and attributes.
    243243                 */
    244                 return apply_filters( 'render_block', $block_content, $this->parsed_block );
     244                $block_content = apply_filters( 'render_block', $block_content, $this->parsed_block );
     245
     246                /**
     247                 * Filters the content of a single block.
     248                 *
     249                 * The dynamic portion of the hook name, `$name`, refers to
     250                 * the block name - "namespace/block".
     251                 *
     252                 * @since x.y.z
     253                 *
     254                 * @param string $block_content The block content about to be appended.
     255                 * @param array  $block         The full block, including name and attributes.
     256                 */
     257                return apply_filters( "render_block_{$this->name}", $block_content, $this->parsed_block );
    245258        }
    246259
    247260}