Skip to content

Commit

Permalink
Fix: Don't register dataviews postype and taxonomy if experiment is n…
Browse files Browse the repository at this point in the history
…ot enable. (#55743)
  • Loading branch information
jorgefilipecosta authored Oct 31, 2023
1 parent 435d90c commit 32aee0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/experimental/data-views.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* Registers the `wp_dataviews` post type and the `wp_dataviews_type` taxonomy.
*/
function _gutenberg_register_data_views_post_type() {
$gutenberg_experiments = get_option( 'gutenberg-experiments' );
if ( empty( $gutenberg_experiments ) || ! array_key_exists( 'gutenberg-dataviews', $gutenberg_experiments ) ) {
return;
}
register_post_type(
'wp_dataviews',
array(
Expand Down

0 comments on commit 32aee0e

Please sign in to comment.