diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 3a8c8dc81439..10fe52a66cfb 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -132,7 +132,7 @@ jobs: matrix: # TODO: add back Firefox once support is more mature. browser: ['chrome'] - wp: ['6.3'] + wp: ['6.4'] snapshots: [false] experimental: [false] # We want to split up the tests into 2 parts running in parallel. diff --git a/.github/workflows/tests-unit-php.yml b/.github/workflows/tests-unit-php.yml index 711687a2b958..458b34da63c8 100644 --- a/.github/workflows/tests-unit-php.yml +++ b/.github/workflows/tests-unit-php.yml @@ -66,7 +66,7 @@ jobs: experimental: false - php: '7.4' - wp: '6.3' + wp: '6.4' experimental: false - php: '8.2' diff --git a/includes/Settings.php b/includes/Settings.php index f7a6ffd9d9a4..629c95d895f9 100644 --- a/includes/Settings.php +++ b/includes/Settings.php @@ -176,10 +176,8 @@ public function __construct( Shopping_Vendors $shopping_vendors ) { * @since 1.37.0 */ public function prime_option_caches(): void { - if ( \function_exists( 'wp_prime_option_caches_by_group' ) ) { - wp_prime_option_caches_by_group( self::SETTING_GROUP ); - wp_prime_option_caches_by_group( self::SETTING_GROUP_EXPERIMENTS ); - } + wp_prime_option_caches_by_group( self::SETTING_GROUP ); + wp_prime_option_caches_by_group( self::SETTING_GROUP_EXPERIMENTS ); } /** diff --git a/includes/Shopping/Product_Meta.php b/includes/Shopping/Product_Meta.php index 1df32a99a1c9..891c10eb1b3b 100644 --- a/includes/Shopping/Product_Meta.php +++ b/includes/Shopping/Product_Meta.php @@ -29,6 +29,7 @@ namespace Google\Web_Stories\Shopping; use Google\Web_Stories\Infrastructure\HasMeta; +use Google\Web_Stories\Infrastructure\HasRequirements; use Google\Web_Stories\Infrastructure\PluginUninstallAware; use Google\Web_Stories\Service_Base; use Google\Web_Stories\Story_Post_Type; @@ -36,7 +37,7 @@ /** * Class Product_Meta. */ -class Product_Meta extends Service_Base implements HasMeta, PluginUninstallAware { +class Product_Meta extends Service_Base implements HasMeta, PluginUninstallAware, HasRequirements { /** * The products meta key. */ @@ -87,22 +88,22 @@ public function register(): void { * @since 1.22.0 */ public function register_meta(): void { - register_meta( - 'post', + register_post_meta( + $this->story_post_type::POST_TYPE_SLUG, self::PRODUCTS_POST_META_KEY, [ - 'type' => 'object', - 'description' => __( 'Products', 'web-stories' ), - 'show_in_rest' => [ + 'type' => 'object', + 'description' => __( 'Products', 'web-stories' ), + 'show_in_rest' => [ 'schema' => [ 'type' => 'object', 'properties' => [], 'additionalProperties' => true, ], ], - 'default' => [], - 'single' => true, - 'object_subtype' => $this->story_post_type::POST_TYPE_SLUG, + 'default' => [], + 'single' => true, + 'revisions_enabled' => true, ] ); } diff --git a/includes/Story_Post_Type.php b/includes/Story_Post_Type.php index 967e3ca0d4c2..26a354a256d0 100644 --- a/includes/Story_Post_Type.php +++ b/includes/Story_Post_Type.php @@ -142,6 +142,7 @@ public function register_meta(): void { 'show_in_rest' => true, 'default' => $active_publisher_logo_id, 'single' => true, + 'revisions_enabled' => true, ] ); @@ -149,9 +150,9 @@ public function register_meta(): void { $this->get_slug(), self::POSTER_META_KEY, [ - 'type' => 'object', - 'description' => __( 'Poster object', 'web-stories' ), - 'show_in_rest' => [ + 'type' => 'object', + 'description' => __( 'Poster object', 'web-stories' ), + 'show_in_rest' => [ 'schema' => [ 'type' => 'object', 'properties' => [ @@ -175,8 +176,9 @@ public function register_meta(): void { ], ], ], - 'default' => [], - 'single' => true, + 'default' => [], + 'single' => true, + 'revisions_enabled' => true, ] ); } diff --git a/includes/Taxonomy/Category_Taxonomy.php b/includes/Taxonomy/Category_Taxonomy.php index fdc2554182d8..a2631067681b 100644 --- a/includes/Taxonomy/Category_Taxonomy.php +++ b/includes/Taxonomy/Category_Taxonomy.php @@ -28,6 +28,7 @@ namespace Google\Web_Stories\Taxonomy; +use Google\Web_Stories\Infrastructure\HasRequirements; use Google\Web_Stories\REST_API\Stories_Terms_Controller; use Google\Web_Stories\Story_Post_Type; @@ -36,7 +37,7 @@ * * @phpstan-import-type TaxonomyArgs from \Google\Web_Stories\Taxonomy\Taxonomy_Base */ -class Category_Taxonomy extends Taxonomy_Base { +class Category_Taxonomy extends Taxonomy_Base implements HasRequirements { /** * Constructor. * diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b77e349ce919..6b6ce38e5386 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,6 +1,6 @@ - + error diff --git a/readme.txt b/readme.txt index d8b6a9313421..7c049a7d9f1e 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: google Tested up to: 6.5 -Requires at least: 6.3 +Requires at least: 6.4 Stable tag: V.V.V License: Apache-2.0 License URI: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/web-stories.php b/web-stories.php index 044481418854..f224598e9d83 100644 --- a/web-stories.php +++ b/web-stories.php @@ -10,7 +10,7 @@ * Author: Google * Author URI: https://opensource.google.com/ * Version: 1.38.0-alpha.0 - * Requires at least: 6.3 + * Requires at least: 6.4 * Requires PHP: 7.4 * Text Domain: web-stories * License: Apache License 2.0 @@ -47,7 +47,7 @@ define( 'WEBSTORIES_PLUGIN_DIR_PATH', plugin_dir_path( WEBSTORIES_PLUGIN_FILE ) ); define( 'WEBSTORIES_PLUGIN_DIR_URL', plugin_dir_url( WEBSTORIES_PLUGIN_FILE ) ); define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '7.4' ); -define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.3' ); +define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.4' ); define( 'WEBSTORIES_CDN_URL', 'https://wp.stories.google/static/main' ); if ( ! defined( 'WEBSTORIES_DEV_MODE' ) ) {