From 7f72fbdbad75da250cab068dde7c92c330ea82e5 Mon Sep 17 00:00:00 2001 From: Herb Miller Date: Sat, 14 Nov 2020 16:50:13 +0000 Subject: [PATCH] Issue #25 - update docblocks --- includes/block-overrides.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/includes/block-overrides.php b/includes/block-overrides.php index 57900fa..05f19ac 100644 --- a/includes/block-overrides.php +++ b/includes/block-overrides.php @@ -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'; @@ -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' ); @@ -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; -} - - - - - - - - +} \ No newline at end of file