Skip to content

Commit

Permalink
code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Nov 1, 2023
1 parent 7ad1e80 commit 04c57cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion entries/slotfills/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function register_slotfills_scripts(): void {
$allowed_post_types = apply_filters( 'wp_curate_duduplication_slotfill_post_types', [ 'page', 'post' ] );

$supported_post_types = new Supported_Post_Types();
if ( ! in_array( $supported_post_types->get_current_post_type(), $allowed_post_types, true ) ) {
if ( ! $supported_post_types->should_register_block() ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/class-supported-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function register_post_meta(): void {
*
* @return boolean
*/
public function should_register_block() {
public function should_register_block(): bool {
return empty( $this->get_current_post_type() ) || in_array( $this->get_current_post_type(), $this->get_supported_post_types(), true );
}
}

0 comments on commit 04c57cf

Please sign in to comment.