Skip to content

Commit

Permalink
Add inline documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceOnTheGo authored and andreasciamanna committed Oct 26, 2018
1 parent 603b0d0 commit 1cae5a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/block/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ function render_block_core_block( $attributes ) {
return '';
}

/**
* Filter to allow plugins to override the reusable block id.
*
* @since 3.5.0
*
* @param int $block_id The id of the reusable block
*/
$reusable_block_id = apply_filters( 'gutenberg_reusable_block_id', $attributes['ref'] );
$reusable_block = get_post( $reusable_block_id );
if ( ! $reusable_block || 'wp_block' !== $reusable_block->post_type ) {
Expand Down

0 comments on commit 1cae5a9

Please sign in to comment.