WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/30/2020 11:02:22 AM (15 months ago)
Author:
gziolo
Message:

Editor: Introduce block context

Backports a new block context feature from Gutenberg. The purpose of this feature is to be able to establish values in a block hierarchy which can be consumed by blocks anywhere lower in the same hierarchy. These values can be established either by the framework, or by other blocks which provide these values. See documentation: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-context.md

Props aduth, epiqueras.
Fixes #49927.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block.php

    r48159 r48224  
    227227        }
    228228
    229         /** This filter is documented in src/wp-includes/blocks.php */
     229        /**
     230         * Filters the content of a single block.
     231         *
     232         * @since 5.0.0
     233         *
     234         * @param string $block_content The block content about to be appended.
     235         * @param array  $block         The full block, including name and attributes.
     236         */
    230237        return apply_filters( 'render_block', $block_content, $this->parsed_block );
    231238    }
Note: See TracChangeset for help on using the changeset viewer.