Skip to content

Commit

Permalink
Issue #25 - update docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Nov 14, 2020
1 parent 69311b3 commit 7f72fbd
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions includes/block-overrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
require_once __DIR__ . '/block-override-functions.php';

/**
* Here we include only the blocks we want to override.
* Here we include the blocks we want to override.
*
* Either comment out the ones that aren't needed any more
* or find another way of detecting whether or not to include the file.
* Either comment out the ones that aren't needed any more - when Gutenberg/core's
* satisfies the requirement
* or find another way of automatically determining whether or not to include the file.
*/
require_once __DIR__ . '/query-pagination.php';
require_once __DIR__ . '/query-loop.php';
Expand All @@ -21,12 +22,18 @@
require_once __DIR__ . '/post-hierarchical-terms.php';
require_once __DIR__ . '/block.php';


/**
* Hook into register_block_types_args before WP_Block_Supports
*/
add_filter( 'register_block_type_args', 'fizzie_register_block_type_args', 9 );


/**
* Implements overrides for core blocks which we need to improve.
*
* @param array $args Block attributes.
* @return array
*/
function fizzie_register_block_type_args( $args ) {
$args = fizzie_maybe_override_block( $args,'core/query-pagination', 'render_block_core_query_pagination');
$args = fizzie_maybe_override_block( $args,'core/query-loop', 'render_block_core_query_loop' );
Expand All @@ -38,12 +45,4 @@ function fizzie_register_block_type_args( $args ) {
$args = fizzie_maybe_override_block( $args,'core/post-hierarchical-terms', 'render_block_core_post_hierarchical_terms' );
$args = fizzie_maybe_override_block( $args,'core/block', 'render_block_core_block' );
return $args;
}








}

0 comments on commit 7f72fbd

Please sign in to comment.