From 9f684c056af37840c253030b01c3f64231e7ab1e Mon Sep 17 00:00:00 2001 From: Mike Auteri Date: Sat, 11 Jan 2025 14:42:49 -0500 Subject: [PATCH] Added comments. --- includes/core/classes/blocks/class-rsvp-response.php | 1 + includes/core/classes/blocks/class-rsvp.php | 1 + 2 files changed, 2 insertions(+) diff --git a/includes/core/classes/blocks/class-rsvp-response.php b/includes/core/classes/blocks/class-rsvp-response.php index f852346f7..b8ac3ad6b 100644 --- a/includes/core/classes/blocks/class-rsvp-response.php +++ b/includes/core/classes/blocks/class-rsvp-response.php @@ -64,6 +64,7 @@ protected function __construct() { */ protected function setup_hooks(): void { add_filter( 'render_block', array( $this, 'transform_block_content' ), 10, 2 ); + // Priority 11 ensures this runs after transform_block_content which modifies the block structure. add_filter( 'render_block', array( $this, 'attach_dropdown_interactivity' ), 11, 2 ); add_filter( 'get_avatar_data', array( $this, 'modify_avatar_for_gatherpress_rsvp' ), 10, 2 ); add_filter( 'block_type_metadata', array( $this, 'add_rsvp_to_comment_ancestor' ) ); diff --git a/includes/core/classes/blocks/class-rsvp.php b/includes/core/classes/blocks/class-rsvp.php index 90832e4aa..f14b4a21e 100644 --- a/includes/core/classes/blocks/class-rsvp.php +++ b/includes/core/classes/blocks/class-rsvp.php @@ -60,6 +60,7 @@ protected function __construct() { protected function setup_hooks(): void { add_filter( 'render_block', array( $this, 'transform_block_content' ), 10, 2 ); add_filter( 'render_block', array( $this, 'apply_rsvp_button_interactivity' ), 10, 2 ); + // Priority 11 ensures this runs after transform_block_content which modifies the block structure. add_filter( 'render_block', array( $this, 'apply_guest_count_watch' ), 11, 2 ); }