WordPress.org

Make WordPress Core

Ticket #46187: 46187.diff

File 46187.diff, 868 bytes (added by manzoorwani.jk, 2 years ago)
  • src/wp-includes/blocks.php

     
    219219                $post          = $global_post;
    220220        }
    221221
     222        // avoid the blocks with $block['blockName'] equal to null
     223        if ( $block_name = $block['blockName'] ) {
     224                /**
     225                 * Filters the content of a single block.
     226                 *
     227                 * The dynamic portion of the hook name, `$block['blockName']`, refers to
     228             * the block name - namespace/block
     229                 *
     230                 * @param string $block_content The block content about to be appended.
     231                 * @param array  $block         The full block, including name and attributes.
     232                 */
     233                $block_content = apply_filters( "render_block_{$block_name}", $block_content, $block );
     234        }
     235
    222236        /**
    223237         * Filters the content of a single block.
    224238         *