| @@ -37,14 +37,8 @@ | ||
| 37 | 37 | * |
| 38 | 38 | * @return bool True when the experiment is enabled. |
| 39 | 39 | */ |
| 40 | 40 | function gutenberg_is_experiment_enabled( $name ) { |
| 41 | - // Special handling for active_templates - check if the active_templates option exists. | |
| 42 | - // This is not stored in the experiments array but as a separate option. | |
| 43 | - if ( 'active_templates' === $name ) { | |
| 44 | - return is_array( get_option( 'active_templates' ) ); | |
| 45 | - } | |
| 46 | - | |
| 47 | 41 | $experiments = get_option( 'gutenberg-experiments' ); |
| 48 | 42 | return ! empty( $experiments[ $name ] ); |
| 49 | 43 | } |
| 50 | 44 | |
| @@ -58,12 +52,10 @@ | ||
| 58 | 52 | // WordPress 7.0 compat. |
| 59 | 53 | require __DIR__ . '/compat/wordpress-7.0/class-gutenberg-rest-revisions-controller.php'; |
| 60 | 54 | require __DIR__ . '/compat/wordpress-7.0/class-gutenberg-rest-block-patterns-controller-7-0.php'; |
| 61 | 55 | require __DIR__ . '/compat/wordpress-7.0/class-gutenberg-rest-templates-controller-7-0.php'; |
| 62 | - require __DIR__ . '/compat/wordpress-7.0/class-gutenberg-rest-static-templates-controller.php'; | |
| 63 | 56 | require __DIR__ . '/compat/wordpress-7.0/class-wp-icons-registry.php'; |
| 64 | 57 | require __DIR__ . '/compat/wordpress-7.0/class-wp-rest-icons-controller.php'; |
| 65 | - require __DIR__ . '/compat/wordpress-7.0/template-activate.php'; | |
| 66 | 58 | require __DIR__ . '/compat/wordpress-7.0/rest-api.php'; |
| 67 | 59 | require __DIR__ . '/compat/wordpress-7.0/global-styles.php'; |
| 68 | 60 | |
| 69 | 61 | // WordPress 7.1 compat. |
| @@ -78,8 +70,14 @@ | ||
| 78 | 70 | require __DIR__ . '/compat/wordpress-7.1/block-bindings.php'; |
| 79 | 71 | require __DIR__ . '/compat/wordpress-7.1/query-block.php'; |
| 80 | 72 | require __DIR__ . '/compat/wordpress-7.1/block-comments.php'; |
| 81 | 73 | |
| 74 | + // WordPress 7.2 compat. | |
| 75 | + require __DIR__ . '/compat/wordpress-7.2/class-gutenberg-rest-templates-controller-7-2.php'; | |
| 76 | + require __DIR__ . '/compat/wordpress-7.2/view-config-api.php'; | |
| 77 | + require __DIR__ . '/compat/wordpress-7.2/class-gutenberg-rest-view-config-controller-7-2.php'; | |
| 78 | + require __DIR__ . '/compat/wordpress-7.2/rest-api.php'; | |
| 79 | + | |
| 82 | 80 | // Real-time collaboration. |
| 83 | 81 | require __DIR__ . '/experimental/collaboration/class-gutenberg-rest-autosaves-controller.php'; |
| 84 | 82 | require __DIR__ . '/experimental/collaboration/rest-api.php'; |
| 85 | 83 | require __DIR__ . '/experimental/collaboration/collaboration.php'; |
| @@ -91,9 +89,8 @@ | ||
| 91 | 89 | require_once __DIR__ . '/class-wp-rest-icons-controller-gutenberg.php'; |
| 92 | 90 | require_once __DIR__ . '/rest-api.php'; |
| 93 | 91 | |
| 94 | 92 | require_once __DIR__ . '/experimental/rest-api.php'; |
| 95 | - require_once __DIR__ . '/experimental/kses-allowed-html.php'; | |
| 96 | 93 | |
| 97 | 94 | require_once __DIR__ . '/experimental/class-gutenberg-hierarchical-sort.php'; |
| 98 | 95 | } |
| 99 | 96 | |