Skip to content

Commit

Permalink
Use non-deprecated hook when possible
Browse files Browse the repository at this point in the history
This brings the same change from this PR:
#31027 which may have missed
the deprecated hook in the refactor PR, since it hadn't landed yet.
  • Loading branch information
mkevins authored and Glen Davies committed Jun 9, 2021
1 parent e183dcb commit b2031f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,9 @@ function gutenberg_experiments_editor_settings( $settings ) {
);
return array_merge( $settings, $experiments_settings );
}
add_filter( 'block_editor_settings', 'gutenberg_experiments_editor_settings' );
// This can be removed when plugin support requires WordPress 5.8.0+.
if ( function_exists( 'get_block_editor_settings' ) ) {
add_filter( 'block_editor_settings_all', 'gutenberg_experiments_editor_settings' );
} else {
add_filter( 'block_editor_settings', 'gutenberg_experiments_editor_settings' );
}

0 comments on commit b2031f2

Please sign in to comment.