From a82b7a3ecdb37e0d29a5f53de74cc677fcd61c1c Mon Sep 17 00:00:00 2001 From: coder-karen Date: Tue, 26 Nov 2024 16:15:55 +0000 Subject: [PATCH] Classic Theme Helper: Copy Testimonials Custom Post Type code to Classic Theme Helper package (#40295) Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12034410054 Upstream-Ref: Automattic/jetpack@63a223a32d1de13fab2ef54350c42cab26708b7b --- composer.lock | 60 +- .../jetpack-classic-theme-helper/CHANGELOG.md | 8 + .../src/class-main.php | 2 +- ...s-jetpack-testimonial-textarea-control.php | 48 + ...lass-jetpack-testimonial-title-control.php | 28 + .../class-jetpack-testimonial.php | 871 ++++++++++++++++++ .../automattic/jetpack-mu-wpcom/composer.json | 2 +- vendor/composer/autoload_classmap.php | 3 + vendor/composer/autoload_static.php | 3 + vendor/composer/installed.json | 58 +- vendor/composer/installed.php | 56 +- 11 files changed, 1050 insertions(+), 89 deletions(-) create mode 100644 vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php create mode 100644 vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php create mode 100644 vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial.php diff --git a/composer.lock b/composer.lock index c1bae5be..cb668054 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eed41d4b687f88ff061c07340d45dcb0", + "content-hash": "927ef57a306de43373d555e6c0d07933", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats", - "reference": "5ee624086927f96c08b8f581018856ec3ab06659" + "reference": "1861b3a332a60a130afa37373af379c69c1b2f1a" }, "require": { "php": ">=7.2" @@ -65,7 +65,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui", - "reference": "f669600dee2c9bb8eaaac044a487583c00659889" + "reference": "791451f4e638a68d43a67073542121a282df3f27" }, "require": { "php": ">=7.2" @@ -130,7 +130,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-assets", - "reference": "8afd13c29582ae4d35c0ca2e2fe92e037359a076" + "reference": "d0db570271749bc8bf1eeebba10769088f1a15aa" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -199,7 +199,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blaze", - "reference": "71e75e3c1d04e496082c0384c25162cd7648c89a" + "reference": "ebdd59a23174e9a15fc8be29d302043c84148938" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -280,7 +280,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blocks", - "reference": "f744531d78a898008ff293efa997375226a9ae64" + "reference": "aa5d5741c51a53a44b3fbea8248ca71244c4c6d5" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -342,7 +342,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-calypsoify", - "reference": "47b17513fd5d59075c0bed8a57d19515214ef542" + "reference": "09e3f89d2f421ffaa3690e0f3e89c42d466c40ca" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -403,11 +403,11 @@ }, { "name": "automattic/jetpack-classic-theme-helper", - "version": "0.7.1", + "version": "0.7.2-alpha.1732636825", "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-classic-theme-helper", - "reference": "dfcc4477890060fb301f84a30737e612e34ec9d8" + "reference": "166f11f4db34bddb278678d54ad8243c1bcf3b61" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -478,7 +478,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-compat", - "reference": "9aa54a1cad8e631ca7450af707b648fa684f9257" + "reference": "c9dd3e0502e1afd1ae5eb8bb106a40416b1deeae" }, "require": { "php": ">=7.2" @@ -515,7 +515,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-connection", - "reference": "5b2edd578f24c5b1143c3c201b406d6d931f0c3c" + "reference": "b2d51c9cb8bd6f3261b2fed1c031a7ad69653393" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -605,7 +605,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-constants", - "reference": "f80bdc5a1afeac19de97b9fc7eb5fcb11df1b1dd" + "reference": "34017e06948bfb203a811c5235710f2ab4b49d9a" }, "require": { "php": ">=7.2" @@ -659,7 +659,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-device-detection", - "reference": "f5dd49dc5e06c290a50935c73f27ba681c0f7842" + "reference": "af1c81a484472f133573622c42f6ada895897292" }, "require": { "php": ">=7.2" @@ -712,7 +712,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-google-analytics", - "reference": "c2c8961fafc7362c454e1cb2406060cd0d71556d" + "reference": "7241fdb9990a4bd7be2cf0e46197ea3d5f266c5c" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -783,7 +783,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-ip", - "reference": "7ce2ff65621f01341f6c58a15883ed1fe85cfbce" + "reference": "d1e57fff265b92df9c0b164f60f095998b5383fe" }, "require": { "php": ">=7.2" @@ -841,7 +841,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-jitm", - "reference": "8641134c171ebb7a6accf0ee5311130b6ca758b3" + "reference": "cd620215bdd019725e19c879b2b6af4ff1fa4f2e" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -916,7 +916,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-logo", - "reference": "c08502ae718a58e8b662b887c009fae54d3c76b8" + "reference": "db12184075081fc3b198aaea22e7cdf783c71df8" }, "require": { "php": ">=7.2" @@ -969,7 +969,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-masterbar", - "reference": "44049ef52ee50efcd9763a2bc7fd963aba7c4e7f" + "reference": "dc77294b5e1b072b5ea4a47773fe50c951f657bd" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -1052,13 +1052,13 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom", - "reference": "c9ec2affa19917a9754ca6de4f762554c5963014" + "reference": "4d030d7f58614165d800f6a37b13a86cc3850033" }, "require": { "automattic/jetpack-assets": "^4.0.0", "automattic/jetpack-blocks": "^3.0.1", "automattic/jetpack-calypsoify": "^0.2.0-alpha", - "automattic/jetpack-classic-theme-helper": "^0.7.1", + "automattic/jetpack-classic-theme-helper": "^0.7.2-alpha", "automattic/jetpack-compat": "^4.0.0", "automattic/jetpack-connection": "^6.1.0", "automattic/jetpack-google-analytics": "^0.3.0-alpha", @@ -1135,7 +1135,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-password-checker", - "reference": "9ac500904707118b22eeddce0a09876f430689c7" + "reference": "a73923a6120c877a7268153166fdb8646b5d8fec" }, "require": { "php": ">=7.2" @@ -1196,7 +1196,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-plans", - "reference": "6ed2cb5551cfcadbf0c6da9b83fc54570617f4d8" + "reference": "f5d3b2ef09790f561f384cdb5a79206331662fbe" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1264,7 +1264,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-redirect", - "reference": "2c20266b8ade237b2ae370d247483754d1f06618" + "reference": "ee4278b843e5c930972287119f883f065ccfd425" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -1319,7 +1319,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-roles", - "reference": "a588f673ac6d5ee748274b5b50bdcd1bf4847909" + "reference": "431d6cdedc37a05d7df634b0f7ea7dadd9a24fbd" }, "require": { "php": ">=7.2" @@ -1373,7 +1373,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats", - "reference": "dde48f613bad5151e3dabaa5d71ccc9aefa3fba3" + "reference": "1550b1e0082877deb4e6f971da6c17db3280f490" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1440,7 +1440,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin", - "reference": "9385dc402f2cafd05acb2f22b8928db69d61a24b" + "reference": "b906e7a4125d1704c89984fc89ad41836086bd63" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1513,7 +1513,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-status", - "reference": "196117097e7abdd9afd2013b0dca24109ce0258a" + "reference": "d2b6081f44c8397574442cea0e19fef00dbeea7b" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -1577,7 +1577,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-sync", - "reference": "f01a93a5b79dbd0ddf546d0f0d77379a96f946cd" + "reference": "278517e1516012e59fe0e078f419c403faba24a7" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1655,7 +1655,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/scheduled-updates", - "reference": "b252c63ded8de362e38f0c51ac16a7e45eb7996a" + "reference": "a0828229927c4b8a9f99410c26d966d554725aa7" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1807,7 +1807,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-changelogger", - "reference": "5516df95678f6b20e9be6b70b2bb449575cd69ad" + "reference": "fa67868e8d60b5cdc078e2fc3b25120748c0a4a3" }, "require": { "php": ">=7.2.5", diff --git a/vendor/automattic/jetpack-classic-theme-helper/CHANGELOG.md b/vendor/automattic/jetpack-classic-theme-helper/CHANGELOG.md index a1e17b68..eb6ac3b5 100644 --- a/vendor/automattic/jetpack-classic-theme-helper/CHANGELOG.md +++ b/vendor/automattic/jetpack-classic-theme-helper/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.2-alpha] - unreleased + +This is an alpha version! The changes listed here are not final. + +### Added +- Classic Theme Helper: Adding Testimonial custom post type content + ## [0.7.1] - 2024-11-25 ### Changed - Updated dependencies. [#40286] @@ -155,6 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Add wordpress folder on gitignore. [#37177] +[0.7.2-alpha]: https://github.com/Automattic/jetpack-classic-theme-helper/compare/v0.7.1...v0.7.2-alpha [0.7.1]: https://github.com/Automattic/jetpack-classic-theme-helper/compare/v0.7.0...v0.7.1 [0.7.0]: https://github.com/Automattic/jetpack-classic-theme-helper/compare/v0.6.7...v0.7.0 [0.6.7]: https://github.com/Automattic/jetpack-classic-theme-helper/compare/v0.6.6...v0.6.7 diff --git a/vendor/automattic/jetpack-classic-theme-helper/src/class-main.php b/vendor/automattic/jetpack-classic-theme-helper/src/class-main.php index 4c7bde89..1c7f736d 100644 --- a/vendor/automattic/jetpack-classic-theme-helper/src/class-main.php +++ b/vendor/automattic/jetpack-classic-theme-helper/src/class-main.php @@ -14,7 +14,7 @@ */ class Main { - const PACKAGE_VERSION = '0.7.1'; + const PACKAGE_VERSION = '0.7.2-alpha'; /** * Modules to include. diff --git a/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php b/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php new file mode 100644 index 00000000..51fd2b5b --- /dev/null +++ b/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php @@ -0,0 +1,48 @@ + + + ]+)?>(.+)?@is', '', $value ); + return $value; + } + } +} diff --git a/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php b/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php new file mode 100644 index 00000000..26fcae02 --- /dev/null +++ b/vendor/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php @@ -0,0 +1,28 @@ +is_wpcom_platform() ) { + $this->maybe_register_cpt(); + } else { + add_action( 'init', array( $this, 'maybe_register_cpt' ) ); + } + } + + /** + * Registers the custom post types and adds action/filter handlers, but + * only if the site supports it + */ + public function maybe_register_cpt() { + // Add an option to enable the CPT. Set the priority to 11 to ensure "Portfolio Projects" appears above "Testimonials" in the UI. + add_action( 'admin_init', array( $this, 'settings_api_init' ), 11 ); + + // Check on theme switch if theme supports CPT and setting is disabled + add_action( 'after_switch_theme', array( $this, 'activation_post_type_support' ) ); + + $setting = class_exists( 'Jetpack_Options' ) ? Jetpack_Options::get_option_and_ensure_autoload( self::OPTION_NAME, '0' ) : '0'; // @phan-suppress-current-line PhanUndeclaredClassMethod -- We check if the class exists first. + + // Bail early if Testimonial option is not set and the theme doesn't declare support + if ( empty( $setting ) && ! $this->site_supports_custom_post_type() ) { + return; + } + + if ( ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM ) && class_exists( 'Jetpack' ) && ! \Jetpack::is_module_active( 'custom-content-types' ) ) { // @phan-suppress-current-line PhanUndeclaredClassMethod -- We check if the class exists first. + return; + } + + // CPT magic + $this->register_post_types(); + add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 ); + add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'flush_rules_on_enable' ), 10 ); + add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE ), array( $this, 'flush_rules_on_first_testimonial' ) ); + add_action( 'after_switch_theme', array( $this, 'flush_rules_on_switch' ) ); + + // Admin Customization + add_filter( 'enter_title_here', array( $this, 'change_default_title' ) ); + add_filter( sprintf( 'manage_%s_posts_columns', self::CUSTOM_POST_TYPE ), array( $this, 'edit_title_column_label' ) ); + add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) ); + if ( ! wp_is_block_theme() ) { + add_action( 'customize_register', array( $this, 'customize_register' ) ); + } + + // Only add the 'Customize' sub-menu if the theme supports it. + if ( is_admin() && current_theme_supports( self::CUSTOM_POST_TYPE ) && ! empty( self::count_testimonials() ) ) { + add_action( 'admin_menu', array( $this, 'add_customize_page' ) ); + } + + if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { + // Track all the things + add_action( sprintf( 'add_option_%s', self::OPTION_NAME ), array( $this, 'new_activation_stat_bump' ) ); + add_action( sprintf( 'update_option_%s', self::OPTION_NAME ), array( $this, 'update_option_stat_bump' ), 11, 2 ); + add_action( sprintf( 'publish_%s', self::CUSTOM_POST_TYPE ), array( $this, 'new_testimonial_stat_bump' ) ); + + // Add to Dotcom XML sitemaps + add_filter( 'wpcom_sitemap_post_types', array( $this, 'add_to_sitemap' ) ); + } else { + // Add to Jetpack XML sitemap + add_filter( 'jetpack_sitemap_post_types', array( $this, 'add_to_sitemap' ) ); + } + + // Adjust CPT archive and custom taxonomies to obey CPT reading setting + add_filter( 'pre_get_posts', array( $this, 'query_reading_setting' ), 20 ); + add_filter( 'infinite_scroll_settings', array( $this, 'infinite_scroll_click_posts_per_page' ) ); + + // Register [jetpack_testimonials] always and + // register [testimonials] if [testimonials] isn't already set + add_shortcode( 'jetpack_testimonials', array( $this, 'jetpack_testimonial_shortcode' ) ); + + if ( ! shortcode_exists( 'testimonials' ) ) { + add_shortcode( 'testimonials', array( $this, 'jetpack_testimonial_shortcode' ) ); + } + + // If CPT was enabled programatically and no CPT items exist when user switches away, disable + if ( $setting && $this->site_supports_custom_post_type() ) { + add_action( 'switch_theme', array( $this, 'deactivation_post_type_support' ) ); + } + } + + /** + * Add a checkbox field in 'Settings' > 'Writing' + * for enabling CPT functionality. + * + * @return void + */ + public function settings_api_init() { + add_settings_field( + self::OPTION_NAME, + '' . __( 'Testimonials', 'jetpack-classic-theme-helper' ) . '', + array( $this, 'setting_html' ), + 'writing', + 'jetpack_cpt_section' + ); + + register_setting( + 'writing', + self::OPTION_NAME, + 'intval' + ); + + // Check if CPT is enabled first so that intval doesn't get set to NULL on re-registering. + if ( $this->site_supports_custom_post_type() ) { + register_setting( + 'writing', + self::OPTION_READING_SETTING, + 'intval' + ); + } + } + + /** + * HTML code to display a checkbox true/false option + * for the CPT setting. + * + * @return void + */ + public function setting_html() { + if ( current_theme_supports( self::CUSTOM_POST_TYPE ) ) : ?> +

+ + + site_supports_custom_post_type() ) : + printf( + '

', + esc_attr( self::OPTION_READING_SETTING ), + sprintf( + /* translators: %1$s is replaced with an input field for numbers */ + esc_html__( 'Testimonial pages display at most %1$s testimonials', 'jetpack-classic-theme-helper' ), + sprintf( + '', + esc_attr( self::OPTION_READING_SETTING ), + esc_attr( get_option( self::OPTION_READING_SETTING, '10' ) ) + ) + ) + ); + endif; + } + + /** + * Should this Custom Post Type be made available? + */ + private function site_supports_custom_post_type() { + // If the current theme requests it. + if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) { + return true; + } + + // Otherwise, say no unless something wants to filter us to say yes. + /** This action is documented in modules/custom-post-types/nova.php */ + return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE ); + } + + /** + * Add to REST API post type allowed list. + * + * @param array $post_types Array of allowed post types. + * @return array `$post_types` with our type added. + */ + public function allow_cpt_rest_api_type( $post_types ) { + $post_types[] = self::CUSTOM_POST_TYPE; + + return $post_types; + } + + /** + * Bump Testimonial > New Activation stat + */ + public function new_activation_stat_bump() { + /** This action is documented in modules/widgets/social-media-icons.php */ + do_action( 'jetpack_bump_stats_extras', 'testimonials', 'new-activation' ); + } + + /** + * Bump Testimonial > Option On/Off stats to get total active + * + * @param mixed $old The old option value. + * @param mixed $new The new option value. + */ + public function update_option_stat_bump( $old, $new ) { + if ( empty( $old ) && ! empty( $new ) ) { + /** This action is documented in modules/widgets/social-media-icons.php */ + do_action( 'jetpack_bump_stats_extras', 'testimonials', 'option-on' ); + } + + if ( ! empty( $old ) && empty( $new ) ) { + /** This action is documented in modules/widgets/social-media-icons.php */ + do_action( 'jetpack_bump_stats_extras', 'testimonials', 'option-off' ); + } + } + + /** + * Bump Testimonial > Published Testimonials stat when testimonials are published + */ + public function new_testimonial_stat_bump() { + /** This action is documented in modules/widgets/social-media-icons.php */ + do_action( 'jetpack_bump_stats_extras', 'testimonials', 'published-testimonials' ); + } + + /** + * Flush permalinks when CPT option is turned on/off + */ + public function flush_rules_on_enable() { + flush_rewrite_rules(); + } + + /** + * Count published testimonials and flush permalinks when first testimonial is published + */ + public function flush_rules_on_first_testimonial() { + $testimonials = get_transient( 'jetpack-testimonial-count-cache' ); + + if ( false === $testimonials ) { + flush_rewrite_rules(); + $testimonials = (int) wp_count_posts( self::CUSTOM_POST_TYPE )->publish; + + if ( ! empty( $testimonials ) ) { + set_transient( 'jetpack-testimonial-count-cache', $testimonials, HOUR_IN_SECONDS * 12 ); + } + } + } + + /** + * Flush permalinks when CPT supported theme is activated + */ + public function flush_rules_on_switch() { + if ( current_theme_supports( self::CUSTOM_POST_TYPE ) ) { + flush_rewrite_rules(); + } + } + + /** + * On plugin/theme activation, check if current theme supports CPT + */ + public static function activation_post_type_support() { + if ( current_theme_supports( self::CUSTOM_POST_TYPE ) ) { + update_option( self::OPTION_NAME, '1' ); + ( new Modules() )->activate( 'custom-content-types', false, false ); + } + } + + /** + * On theme switch, check if CPT item exists and disable if not + */ + public function deactivation_post_type_support() { + $portfolios = get_posts( + array( + 'fields' => 'ids', + 'posts_per_page' => 1, + 'post_type' => self::CUSTOM_POST_TYPE, + 'suppress_filters' => false, + ) + ); + + if ( empty( $portfolios ) ) { + update_option( self::OPTION_NAME, '0' ); + } + } + + /** + * Register Post Type + */ + public function register_post_types() { + if ( post_type_exists( self::CUSTOM_POST_TYPE ) ) { + return; + } + + register_post_type( + self::CUSTOM_POST_TYPE, + array( + 'description' => __( 'Customer Testimonials', 'jetpack-classic-theme-helper' ), + 'labels' => array( + 'name' => esc_html__( 'Testimonials', 'jetpack-classic-theme-helper' ), + 'singular_name' => esc_html__( 'Testimonial', 'jetpack-classic-theme-helper' ), + 'menu_name' => esc_html__( 'Testimonials', 'jetpack-classic-theme-helper' ), + 'all_items' => esc_html__( 'All Testimonials', 'jetpack-classic-theme-helper' ), + 'add_new' => esc_html__( 'Add New', 'jetpack-classic-theme-helper' ), + 'add_new_item' => esc_html__( 'Add New Testimonial', 'jetpack-classic-theme-helper' ), + 'edit_item' => esc_html__( 'Edit Testimonial', 'jetpack-classic-theme-helper' ), + 'new_item' => esc_html__( 'New Testimonial', 'jetpack-classic-theme-helper' ), + 'view_item' => esc_html__( 'View Testimonial', 'jetpack-classic-theme-helper' ), + 'search_items' => esc_html__( 'Search Testimonials', 'jetpack-classic-theme-helper' ), + 'not_found' => esc_html__( 'No Testimonials found', 'jetpack-classic-theme-helper' ), + 'not_found_in_trash' => esc_html__( 'No Testimonials found in Trash', 'jetpack-classic-theme-helper' ), + 'filter_items_list' => esc_html__( 'Filter Testimonials list', 'jetpack-classic-theme-helper' ), + 'items_list_navigation' => esc_html__( 'Testimonial list navigation', 'jetpack-classic-theme-helper' ), + 'items_list' => esc_html__( 'Testimonials list', 'jetpack-classic-theme-helper' ), + ), + 'supports' => array( + 'title', + 'editor', + 'thumbnail', + 'page-attributes', + 'revisions', + 'excerpt', + 'newspack_blocks', + ), + 'rewrite' => array( + 'slug' => 'testimonial', + 'with_front' => false, + 'feeds' => false, + 'pages' => true, + ), + 'public' => true, + 'show_ui' => true, + 'menu_position' => 20, // below Pages + 'menu_icon' => 'dashicons-testimonial', + 'capability_type' => 'page', + 'map_meta_cap' => true, + 'has_archive' => true, + 'query_var' => 'testimonial', + 'show_in_rest' => true, + ) + ); + } + + /** + * Update messages for the Testimonial admin. + * + * @param array $messages Existing post update messages. + * @return array Updated `$messages`. + */ + public function updated_messages( $messages ) { + global $post; + + $messages[ self::CUSTOM_POST_TYPE ] = array( + 0 => '', // Unused. Messages start at index 1. + 1 => sprintf( + /* Translators: link to Testimonial item's page. */ + __( 'Testimonial updated. View testimonial', 'jetpack-classic-theme-helper' ), + esc_url( get_permalink( $post->ID ) ) + ), + 2 => esc_html__( 'Custom field updated.', 'jetpack-classic-theme-helper' ), + 3 => esc_html__( 'Custom field deleted.', 'jetpack-classic-theme-helper' ), + 4 => esc_html__( 'Testimonial updated.', 'jetpack-classic-theme-helper' ), + 5 => isset( $_GET['revision'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Copying core message handling. + ? sprintf( + /* translators: %s: date and time of the revision */ + esc_html__( 'Testimonial restored to revision from %s', 'jetpack-classic-theme-helper' ), + wp_post_revision_title( (int) $_GET['revision'], false ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Copying core message handling. + ) + : false, + 6 => sprintf( + /* Translators: link to Testimonial item's page. */ + __( 'Testimonial published. View testimonial', 'jetpack-classic-theme-helper' ), + esc_url( get_permalink( $post->ID ) ) + ), + 7 => esc_html__( 'Testimonial saved.', 'jetpack-classic-theme-helper' ), + 8 => sprintf( + /* Translators: link to Testimonial item's page. */ + __( 'Testimonial submitted. Preview testimonial', 'jetpack-classic-theme-helper' ), + esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) + ), + 9 => sprintf( + /* Translators: 1: Publishing date and time. 2. Link to testimonial's item page. */ + __( 'Testimonial scheduled for: %1$s. Preview testimonial', 'jetpack-classic-theme-helper' ), + // translators: Publish box date format, see https://php.net/date + date_i18n( __( 'M j, Y @ G:i', 'jetpack-classic-theme-helper' ), strtotime( $post->post_date ) ), + esc_url( get_permalink( $post->ID ) ) + ), + 10 => sprintf( + /* Translators: link to Testimonial item's page. */ + __( 'Testimonial draft updated. Preview testimonial', 'jetpack-classic-theme-helper' ), + esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) + ), + ); + + return $messages; + } + + /** + * Change ‘Enter Title Here’ text for the Testimonial. + * + * @param string $title Placeholder text. Default 'Add title'. + * @return string Replacement title. + */ + public function change_default_title( $title ) { + if ( self::CUSTOM_POST_TYPE === get_post_type() ) { + $title = esc_html__( "Enter the customer's name here", 'jetpack-classic-theme-helper' ); + } + + return $title; + } + + /** + * Change ‘Title’ column label on all Testimonials page. + * + * @param array $columns An array of column names. + * @return array Updated array. + */ + public function edit_title_column_label( $columns ) { + $columns['title'] = esc_html__( 'Customer Name', 'jetpack-classic-theme-helper' ); + + return $columns; + } + + /** + * Follow CPT reading setting on CPT archive page + * + * @param WP_Query $query A WP_Query instance. + */ + public function query_reading_setting( $query ) { + if ( ! is_admin() + && $query->is_main_query() + && $query->is_post_type_archive( self::CUSTOM_POST_TYPE ) + ) { + $query->set( 'posts_per_page', get_option( self::OPTION_READING_SETTING, '10' ) ); + } + } + + /** + * If Infinite Scroll is set to 'click', use our custom reading setting instead of core's `posts_per_page`. + * + * @param array $settings Array of Infinite Scroll settings. + * @return array Updated `$settings`. + */ + public function infinite_scroll_click_posts_per_page( $settings ) { + global $wp_query; + + if ( ! is_admin() && true === $settings['click_handle'] && $wp_query->is_post_type_archive( self::CUSTOM_POST_TYPE ) ) { + $settings['posts_per_page'] = get_option( self::OPTION_READING_SETTING, $settings['posts_per_page'] ); // phpcs:ignore WordPress.WP.PostsPerPage.posts_per_page_posts_per_page + } + + return $settings; + } + + /** + * Add CPT to Dotcom sitemap + * + * @param array $post_types Array of post types included in sitemap. + * @return array Updated `$post_types`. + */ + public function add_to_sitemap( $post_types ) { + $post_types[] = self::CUSTOM_POST_TYPE; + + return $post_types; + } + + /** + * Count the number of published testimonials. + * + * @return int + */ + private function count_testimonials() { + $testimonials = get_transient( 'jetpack-testimonial-count-cache' ); + + if ( false === $testimonials ) { + $testimonials = (int) wp_count_posts( self::CUSTOM_POST_TYPE )->publish; + + if ( ! empty( $testimonials ) ) { + set_transient( 'jetpack-testimonial-count-cache', $testimonials, 60 * 60 * 12 ); + } + } + + return $testimonials; + } + + /** + * Adds a submenu link to the Customizer. + */ + public function add_customize_page() { + add_submenu_page( + 'edit.php?post_type=' . self::CUSTOM_POST_TYPE, + esc_html__( 'Customize Testimonials Archive', 'jetpack-classic-theme-helper' ), + esc_html__( 'Customize', 'jetpack-classic-theme-helper' ), + 'edit_theme_options', + add_query_arg( + array( + 'url' => rawurlencode( home_url( '/testimonial/' ) ), + 'autofocus[section]' => 'jetpack_testimonials', + ), + 'customize.php' + ) + ); + } + + /** + * Adds testimonial section to the Customizer. + * + * @param WP_Customize_Manager $wp_customize Customizer instance. + */ + public function customize_register( $wp_customize ) { + + require_once __DIR__ . '/class-jetpack-testimonial-textarea-control.php'; + require_once __DIR__ . '/class-jetpack-testimonial-title-control.php'; + + $wp_customize->add_section( + 'jetpack_testimonials', + array( + 'title' => esc_html__( 'Testimonials', 'jetpack-classic-theme-helper' ), + 'theme_supports' => self::CUSTOM_POST_TYPE, + 'priority' => 130, + ) + ); + + $wp_customize->add_setting( + 'jetpack_testimonials[page-title]', + array( + 'default' => esc_html__( 'Testimonials', 'jetpack-classic-theme-helper' ), + 'sanitize_callback' => array( Jetpack_Testimonial_Title_Control::class, 'sanitize_content' ), + 'sanitize_js_callback' => array( Jetpack_Testimonial_Title_Control::class, 'sanitize_content' ), + ) + ); + $wp_customize->add_control( + 'jetpack_testimonials[page-title]', + array( + 'section' => 'jetpack_testimonials', + 'label' => esc_html__( 'Testimonial Archive Title', 'jetpack-classic-theme-helper' ), + 'type' => 'text', + ) + ); + + $wp_customize->add_setting( + 'jetpack_testimonials[page-content]', + array( + 'default' => '', + 'sanitize_callback' => array( Jetpack_Testimonial_Textarea_Control::class, 'sanitize_content' ), + 'sanitize_js_callback' => array( Jetpack_Testimonial_Textarea_Control::class, 'sanitize_content' ), + ) + ); + $wp_customize->add_control( + new Jetpack_Testimonial_Textarea_Control( + $wp_customize, + 'jetpack_testimonials[page-content]', + array( + 'section' => 'jetpack_testimonials', + 'settings' => 'jetpack_testimonials[page-content]', + 'label' => esc_html__( 'Testimonial Archive Content', 'jetpack-classic-theme-helper' ), + ) + ) + ); + + $wp_customize->add_setting( + 'jetpack_testimonials[featured-image]', + array( + 'default' => '', + 'sanitize_callback' => 'attachment_url_to_postid', + 'sanitize_js_callback' => 'attachment_url_to_postid', + 'theme_supports' => 'post-thumbnails', + ) + ); + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'jetpack_testimonials[featured-image]', + array( + 'section' => 'jetpack_testimonials', + 'label' => esc_html__( 'Testimonial Archive Featured Image', 'jetpack-classic-theme-helper' ), + ) + ) + ); + + // The featured image control doesn't display properly in the Customizer unless we coerce + // it back into a URL sooner, since that's what WP_Customize_Upload_Control::to_json() expects + if ( is_admin() ) { + add_filter( 'theme_mod_jetpack_testimonials', array( $this, 'coerce_testimonial_image_to_url' ) ); + } + } + + /** + * Add Featured image to theme mod if necessary. + * + * @param array $opt The value of the current theme modification. + * @return array Updated `$opt`. + */ + public function coerce_testimonial_image_to_url( $opt ) { + if ( ! $opt || ! is_array( $opt ) ) { + return $opt; + } + if ( ! isset( $opt['featured-image'] ) || ! is_scalar( $opt['featured-image'] ) ) { + return $opt; + } + $url = wp_get_attachment_url( $opt['featured-image'] ); + if ( $url ) { + $opt['featured-image'] = $url; + } + return $opt; + } + + /** + * Our [testimonial] shortcode. + * Prints Testimonial data styled to look good on *any* theme. + * + * @param array $atts Shortcode attributes. + * + * @return string HTML from `self::jetpack_testimonial_shortcode_html()`. + */ + public static function jetpack_testimonial_shortcode( $atts ) { + // Default attributes. + $atts = shortcode_atts( + array( + 'display_content' => true, // Can be false, true, or full. + 'image' => true, + 'columns' => 1, + 'showposts' => -1, + 'order' => 'asc', + 'orderby' => 'menu_order,date', + ), + $atts, + 'testimonial' + ); + + // A little sanitization. + if ( + $atts['display_content'] + && 'true' != $atts['display_content'] // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual + && 'full' !== $atts['display_content'] + ) { + $atts['display_content'] = false; + } + + if ( $atts['image'] && 'true' != $atts['image'] ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseNotEqual + $atts['image'] = false; + } + + $atts['columns'] = absint( $atts['columns'] ); + + $atts['showposts'] = (int) $atts['showposts']; + + if ( $atts['order'] ) { + $atts['order'] = urldecode( $atts['order'] ); + $atts['order'] = strtoupper( $atts['order'] ); + if ( 'DESC' !== $atts['order'] ) { + $atts['order'] = 'ASC'; + } + } + + if ( $atts['orderby'] ) { + $atts['orderby'] = urldecode( $atts['orderby'] ); + $atts['orderby'] = strtolower( $atts['orderby'] ); + $allowed_keys = array( 'author', 'date', 'title', 'menu_order', 'rand' ); + + $parsed = array(); + foreach ( explode( ',', $atts['orderby'] ) as $orderby ) { + if ( ! in_array( $orderby, $allowed_keys, true ) ) { + continue; + } + $parsed[] = $orderby; + } + + if ( empty( $parsed ) ) { + unset( $atts['orderby'] ); + } else { + $atts['orderby'] = implode( ' ', $parsed ); + } + } + + // enqueue shortcode styles when shortcode is used + if ( ! wp_style_is( 'jetpack-testimonial-style', 'enqueued' ) ) { + wp_enqueue_style( 'jetpack-testimonial-style', plugins_url( 'css/testimonial-shortcode.css', __FILE__ ), array(), '20140326' ); + } + + return self::jetpack_testimonial_shortcode_html( $atts ); + } + + /** + * The Testimonial shortcode loop. + * + * @param array $atts Shortcode attributes. + * + * @return string html + */ + private static function jetpack_testimonial_shortcode_html( $atts ) { + // Default query arguments + $defaults = array( + 'order' => $atts['order'], + 'orderby' => $atts['orderby'], + 'posts_per_page' => $atts['showposts'], + ); + + $args = wp_parse_args( $atts, $defaults ); + $args['post_type'] = self::CUSTOM_POST_TYPE; // Force this post type + $query = new WP_Query( $args ); + + $testimonial_index_number = 0; + + ob_start(); + + // If we have testimonials, create the html + if ( $query->have_posts() ) { + + ?> +
+ have_posts() ) { + $query->the_post(); + $post_id = get_the_ID(); + ?> +
+ +
+ +
+ + + +
+ +
+ +

+ 1 ) { + if ( ( $testimonial_index_number % 2 ) === 0 ) { + $class[] = 'testimonial-entry-mobile-first-item-row'; + } else { + $class[] = 'testimonial-entry-mobile-last-item-row'; + } + } + + // add first and last classes to first and last items in a row + if ( ( $testimonial_index_number % $columns ) === 0 ) { + $class[] = 'testimonial-entry-first-item-row'; + } elseif ( ( $testimonial_index_number % $columns ) === ( $columns - 1 ) ) { + $class[] = 'testimonial-entry-last-item-row'; + } + + // add class if testimonial has a featured image + if ( false !== $image ) { + $class[] = 'has-testimonial-thumbnail'; + } + + /** + * Filter the class applied to testimonial div in the testimonial + * + * @module custom-content-types + * + * @since 3.4.0 + * + * @param string $class class name of the div. + * @param int $testimonial_index_number iterator count the number of columns up starting from 0. + * @param int $columns number of columns to display the content in. + * @param boolean $image has a thumbnail or not. + */ + return apply_filters( 'testimonial-entry-post-class', implode( ' ', $class ), $testimonial_index_number, $columns, $image ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + } + + /** + * Display the featured image if it's available + * + * @param int $post_id Post ID. + * + * @return string html + */ + private static function get_testimonial_thumbnail_link( $post_id ) { + if ( has_post_thumbnail( $post_id ) ) { + /** + * Change the thumbnail size for the Testimonial CPT. + * + * @module custom-content-types + * + * @since 3.4.0 + * + * @param string|array $var Either a registered size keyword or size array. + */ + return '' . get_the_post_thumbnail( $post_id, apply_filters( 'jetpack_testimonial_thumbnail_size', 'thumbnail' ) ) . ''; + } + } + } + +} diff --git a/vendor/automattic/jetpack-mu-wpcom/composer.json b/vendor/automattic/jetpack-mu-wpcom/composer.json index c33e3bc9..f50550e8 100644 --- a/vendor/automattic/jetpack-mu-wpcom/composer.json +++ b/vendor/automattic/jetpack-mu-wpcom/composer.json @@ -8,7 +8,7 @@ "automattic/jetpack-assets": "^4.0.0", "automattic/jetpack-blocks": "^3.0.1", "automattic/jetpack-calypsoify": "^0.2.0-alpha", - "automattic/jetpack-classic-theme-helper": "^0.7.1", + "automattic/jetpack-classic-theme-helper": "^0.7.2-alpha", "automattic/jetpack-connection": "^6.1.0", "automattic/jetpack-masterbar": "^0.10.1", "automattic/jetpack-redirect": "^3.0.1", diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7ddeceb3..10cb9f73 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -36,6 +36,9 @@ 'Automattic\\Jetpack\\Calypsoify\\Jetpack_Calypsoify' => $vendorDir . '/automattic/jetpack-calypsoify/src/class-jetpack-calypsoify.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Featured_Content' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/class-featured-content.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Portfolio' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-portfolio.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial_Textarea_Control' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial_Title_Control' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Main' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/class-main.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Social_Links' => $vendorDir . '/automattic/jetpack-classic-theme-helper/src/class-social-links.php', 'Automattic\\Jetpack\\Connection\\Authorize_Json_Api' => $vendorDir . '/automattic/jetpack-connection/src/class-authorize-json-api.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 096932f1..11639b28 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -56,6 +56,9 @@ class ComposerStaticInitd9d132a783958a00a2c7cccff60ca42d_jetpack_mu_wpcom_plugin 'Automattic\\Jetpack\\Calypsoify\\Jetpack_Calypsoify' => __DIR__ . '/..' . '/automattic/jetpack-calypsoify/src/class-jetpack-calypsoify.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Featured_Content' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/class-featured-content.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Portfolio' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-portfolio.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial_Textarea_Control' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-textarea-control.php', + 'Automattic\\Jetpack\\Classic_Theme_Helper\\Jetpack_Testimonial_Title_Control' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/custom-post-types/class-jetpack-testimonial-title-control.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Main' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/class-main.php', 'Automattic\\Jetpack\\Classic_Theme_Helper\\Social_Links' => __DIR__ . '/..' . '/automattic/jetpack-classic-theme-helper/src/class-social-links.php', 'Automattic\\Jetpack\\Connection\\Authorize_Json_Api' => __DIR__ . '/..' . '/automattic/jetpack-connection/src/class-authorize-json-api.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index d4fef14e..4505a79b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -7,7 +7,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats", - "reference": "5ee624086927f96c08b8f581018856ec3ab06659" + "reference": "1861b3a332a60a130afa37373af379c69c1b2f1a" }, "require": { "php": ">=7.2" @@ -63,7 +63,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui", - "reference": "f669600dee2c9bb8eaaac044a487583c00659889" + "reference": "791451f4e638a68d43a67073542121a282df3f27" }, "require": { "php": ">=7.2" @@ -131,7 +131,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-assets", - "reference": "8afd13c29582ae4d35c0ca2e2fe92e037359a076" + "reference": "d0db570271749bc8bf1eeebba10769088f1a15aa" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -203,7 +203,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blaze", - "reference": "71e75e3c1d04e496082c0384c25162cd7648c89a" + "reference": "ebdd59a23174e9a15fc8be29d302043c84148938" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -287,7 +287,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-blocks", - "reference": "f744531d78a898008ff293efa997375226a9ae64" + "reference": "aa5d5741c51a53a44b3fbea8248ca71244c4c6d5" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -352,7 +352,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-calypsoify", - "reference": "47b17513fd5d59075c0bed8a57d19515214ef542" + "reference": "09e3f89d2f421ffaa3690e0f3e89c42d466c40ca" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -415,12 +415,12 @@ }, { "name": "automattic/jetpack-classic-theme-helper", - "version": "0.7.1", - "version_normalized": "0.7.1.0", + "version": "0.7.2-alpha.1732636825", + "version_normalized": "0.7.2.0-alpha1732636825", "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-classic-theme-helper", - "reference": "dfcc4477890060fb301f84a30737e612e34ec9d8" + "reference": "166f11f4db34bddb278678d54ad8243c1bcf3b61" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -494,7 +494,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-compat", - "reference": "9aa54a1cad8e631ca7450af707b648fa684f9257" + "reference": "c9dd3e0502e1afd1ae5eb8bb106a40416b1deeae" }, "require": { "php": ">=7.2" @@ -534,7 +534,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-connection", - "reference": "5b2edd578f24c5b1143c3c201b406d6d931f0c3c" + "reference": "b2d51c9cb8bd6f3261b2fed1c031a7ad69653393" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -627,7 +627,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-constants", - "reference": "f80bdc5a1afeac19de97b9fc7eb5fcb11df1b1dd" + "reference": "34017e06948bfb203a811c5235710f2ab4b49d9a" }, "require": { "php": ">=7.2" @@ -684,7 +684,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-device-detection", - "reference": "f5dd49dc5e06c290a50935c73f27ba681c0f7842" + "reference": "af1c81a484472f133573622c42f6ada895897292" }, "require": { "php": ">=7.2" @@ -740,7 +740,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-google-analytics", - "reference": "c2c8961fafc7362c454e1cb2406060cd0d71556d" + "reference": "7241fdb9990a4bd7be2cf0e46197ea3d5f266c5c" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -814,7 +814,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-ip", - "reference": "7ce2ff65621f01341f6c58a15883ed1fe85cfbce" + "reference": "d1e57fff265b92df9c0b164f60f095998b5383fe" }, "require": { "php": ">=7.2" @@ -875,7 +875,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-jitm", - "reference": "8641134c171ebb7a6accf0ee5311130b6ca758b3" + "reference": "cd620215bdd019725e19c879b2b6af4ff1fa4f2e" }, "require": { "automattic/jetpack-a8c-mc-stats": "^3.0.0", @@ -953,7 +953,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-logo", - "reference": "c08502ae718a58e8b662b887c009fae54d3c76b8" + "reference": "db12184075081fc3b198aaea22e7cdf783c71df8" }, "require": { "php": ">=7.2" @@ -1009,7 +1009,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-masterbar", - "reference": "44049ef52ee50efcd9763a2bc7fd963aba7c4e7f" + "reference": "dc77294b5e1b072b5ea4a47773fe50c951f657bd" }, "require": { "automattic/jetpack-assets": "^4.0.0", @@ -1095,13 +1095,13 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom", - "reference": "c9ec2affa19917a9754ca6de4f762554c5963014" + "reference": "4d030d7f58614165d800f6a37b13a86cc3850033" }, "require": { "automattic/jetpack-assets": "^4.0.0", "automattic/jetpack-blocks": "^3.0.1", "automattic/jetpack-calypsoify": "^0.2.0-alpha", - "automattic/jetpack-classic-theme-helper": "^0.7.1", + "automattic/jetpack-classic-theme-helper": "^0.7.2-alpha", "automattic/jetpack-compat": "^4.0.0", "automattic/jetpack-connection": "^6.1.0", "automattic/jetpack-google-analytics": "^0.3.0-alpha", @@ -1181,7 +1181,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-password-checker", - "reference": "9ac500904707118b22eeddce0a09876f430689c7" + "reference": "a73923a6120c877a7268153166fdb8646b5d8fec" }, "require": { "php": ">=7.2" @@ -1245,7 +1245,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-plans", - "reference": "6ed2cb5551cfcadbf0c6da9b83fc54570617f4d8" + "reference": "f5d3b2ef09790f561f384cdb5a79206331662fbe" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1316,7 +1316,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-redirect", - "reference": "2c20266b8ade237b2ae370d247483754d1f06618" + "reference": "ee4278b843e5c930972287119f883f065ccfd425" }, "require": { "automattic/jetpack-status": "^5.0.1", @@ -1374,7 +1374,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-roles", - "reference": "a588f673ac6d5ee748274b5b50bdcd1bf4847909" + "reference": "431d6cdedc37a05d7df634b0f7ea7dadd9a24fbd" }, "require": { "php": ">=7.2" @@ -1431,7 +1431,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats", - "reference": "dde48f613bad5151e3dabaa5d71ccc9aefa3fba3" + "reference": "1550b1e0082877deb4e6f971da6c17db3280f490" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1501,7 +1501,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin", - "reference": "9385dc402f2cafd05acb2f22b8928db69d61a24b" + "reference": "b906e7a4125d1704c89984fc89ad41836086bd63" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1577,7 +1577,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-status", - "reference": "196117097e7abdd9afd2013b0dca24109ce0258a" + "reference": "d2b6081f44c8397574442cea0e19fef00dbeea7b" }, "require": { "automattic/jetpack-constants": "^3.0.1", @@ -1644,7 +1644,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-sync", - "reference": "f01a93a5b79dbd0ddf546d0f0d77379a96f946cd" + "reference": "278517e1516012e59fe0e078f419c403faba24a7" }, "require": { "automattic/jetpack-connection": "^6.1.0", @@ -1725,7 +1725,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/scheduled-updates", - "reference": "b252c63ded8de362e38f0c51ac16a7e45eb7996a" + "reference": "a0828229927c4b8a9f99410c26d966d554725aa7" }, "require": { "automattic/jetpack-connection": "^6.1.0", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index bbf89a2d..df64cc4f 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -13,7 +13,7 @@ 'automattic/jetpack-a8c-mc-stats' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', - 'reference' => '5ee624086927f96c08b8f581018856ec3ab06659', + 'reference' => '1861b3a332a60a130afa37373af379c69c1b2f1a', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-a8c-mc-stats', 'aliases' => array(), @@ -22,7 +22,7 @@ 'automattic/jetpack-admin-ui' => array( 'pretty_version' => '0.5.1', 'version' => '0.5.1.0', - 'reference' => 'f669600dee2c9bb8eaaac044a487583c00659889', + 'reference' => '791451f4e638a68d43a67073542121a282df3f27', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-admin-ui', 'aliases' => array(), @@ -31,7 +31,7 @@ 'automattic/jetpack-assets' => array( 'pretty_version' => '4.0.0', 'version' => '4.0.0.0', - 'reference' => '8afd13c29582ae4d35c0ca2e2fe92e037359a076', + 'reference' => 'd0db570271749bc8bf1eeebba10769088f1a15aa', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-assets', 'aliases' => array(), @@ -40,7 +40,7 @@ 'automattic/jetpack-blaze' => array( 'pretty_version' => '0.25.2', 'version' => '0.25.2.0', - 'reference' => '71e75e3c1d04e496082c0384c25162cd7648c89a', + 'reference' => 'ebdd59a23174e9a15fc8be29d302043c84148938', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-blaze', 'aliases' => array(), @@ -49,7 +49,7 @@ 'automattic/jetpack-blocks' => array( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', - 'reference' => 'f744531d78a898008ff293efa997375226a9ae64', + 'reference' => 'aa5d5741c51a53a44b3fbea8248ca71244c4c6d5', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-blocks', 'aliases' => array(), @@ -58,16 +58,16 @@ 'automattic/jetpack-calypsoify' => array( 'pretty_version' => '0.2.0-alpha.1732205217', 'version' => '0.2.0.0-alpha1732205217', - 'reference' => '47b17513fd5d59075c0bed8a57d19515214ef542', + 'reference' => '09e3f89d2f421ffaa3690e0f3e89c42d466c40ca', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-calypsoify', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-classic-theme-helper' => array( - 'pretty_version' => '0.7.1', - 'version' => '0.7.1.0', - 'reference' => 'dfcc4477890060fb301f84a30737e612e34ec9d8', + 'pretty_version' => '0.7.2-alpha.1732636825', + 'version' => '0.7.2.0-alpha1732636825', + 'reference' => '166f11f4db34bddb278678d54ad8243c1bcf3b61', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-classic-theme-helper', 'aliases' => array(), @@ -76,7 +76,7 @@ 'automattic/jetpack-compat' => array( 'pretty_version' => '4.0.0', 'version' => '4.0.0.0', - 'reference' => '9aa54a1cad8e631ca7450af707b648fa684f9257', + 'reference' => 'c9dd3e0502e1afd1ae5eb8bb106a40416b1deeae', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-compat', 'aliases' => array(), @@ -85,7 +85,7 @@ 'automattic/jetpack-connection' => array( 'pretty_version' => '6.1.0', 'version' => '6.1.0.0', - 'reference' => '5b2edd578f24c5b1143c3c201b406d6d931f0c3c', + 'reference' => 'b2d51c9cb8bd6f3261b2fed1c031a7ad69653393', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-connection', 'aliases' => array(), @@ -94,7 +94,7 @@ 'automattic/jetpack-constants' => array( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', - 'reference' => 'f80bdc5a1afeac19de97b9fc7eb5fcb11df1b1dd', + 'reference' => '34017e06948bfb203a811c5235710f2ab4b49d9a', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-constants', 'aliases' => array(), @@ -103,7 +103,7 @@ 'automattic/jetpack-device-detection' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', - 'reference' => 'f5dd49dc5e06c290a50935c73f27ba681c0f7842', + 'reference' => 'af1c81a484472f133573622c42f6ada895897292', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-device-detection', 'aliases' => array(), @@ -112,7 +112,7 @@ 'automattic/jetpack-google-analytics' => array( 'pretty_version' => '0.3.0-alpha.1731518828', 'version' => '0.3.0.0-alpha1731518828', - 'reference' => 'c2c8961fafc7362c454e1cb2406060cd0d71556d', + 'reference' => '7241fdb9990a4bd7be2cf0e46197ea3d5f266c5c', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-google-analytics', 'aliases' => array(), @@ -121,7 +121,7 @@ 'automattic/jetpack-ip' => array( 'pretty_version' => '0.4.1', 'version' => '0.4.1.0', - 'reference' => '7ce2ff65621f01341f6c58a15883ed1fe85cfbce', + 'reference' => 'd1e57fff265b92df9c0b164f60f095998b5383fe', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-ip', 'aliases' => array(), @@ -130,7 +130,7 @@ 'automattic/jetpack-jitm' => array( 'pretty_version' => '4.0.1', 'version' => '4.0.1.0', - 'reference' => '8641134c171ebb7a6accf0ee5311130b6ca758b3', + 'reference' => 'cd620215bdd019725e19c879b2b6af4ff1fa4f2e', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-jitm', 'aliases' => array(), @@ -139,7 +139,7 @@ 'automattic/jetpack-logo' => array( 'pretty_version' => '3.0.0', 'version' => '3.0.0.0', - 'reference' => 'c08502ae718a58e8b662b887c009fae54d3c76b8', + 'reference' => 'db12184075081fc3b198aaea22e7cdf783c71df8', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-logo', 'aliases' => array(), @@ -148,7 +148,7 @@ 'automattic/jetpack-masterbar' => array( 'pretty_version' => '0.10.1', 'version' => '0.10.1.0', - 'reference' => '44049ef52ee50efcd9763a2bc7fd963aba7c4e7f', + 'reference' => 'dc77294b5e1b072b5ea4a47773fe50c951f657bd', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-masterbar', 'aliases' => array(), @@ -157,7 +157,7 @@ 'automattic/jetpack-mu-wpcom' => array( 'pretty_version' => '6.0.0-alpha.1732217150', 'version' => '6.0.0.0-alpha1732217150', - 'reference' => 'c9ec2affa19917a9754ca6de4f762554c5963014', + 'reference' => '4d030d7f58614165d800f6a37b13a86cc3850033', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-mu-wpcom', 'aliases' => array(), @@ -175,7 +175,7 @@ 'automattic/jetpack-password-checker' => array( 'pretty_version' => '0.4.1', 'version' => '0.4.1.0', - 'reference' => '9ac500904707118b22eeddce0a09876f430689c7', + 'reference' => 'a73923a6120c877a7268153166fdb8646b5d8fec', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-password-checker', 'aliases' => array(), @@ -184,7 +184,7 @@ 'automattic/jetpack-plans' => array( 'pretty_version' => '0.5.1', 'version' => '0.5.1.0', - 'reference' => '6ed2cb5551cfcadbf0c6da9b83fc54570617f4d8', + 'reference' => 'f5d3b2ef09790f561f384cdb5a79206331662fbe', 'type' => 'library', 'install_path' => __DIR__ . '/../automattic/jetpack-plans', 'aliases' => array(), @@ -193,7 +193,7 @@ 'automattic/jetpack-redirect' => array( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', - 'reference' => '2c20266b8ade237b2ae370d247483754d1f06618', + 'reference' => 'ee4278b843e5c930972287119f883f065ccfd425', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-redirect', 'aliases' => array(), @@ -202,7 +202,7 @@ 'automattic/jetpack-roles' => array( 'pretty_version' => '3.0.1', 'version' => '3.0.1.0', - 'reference' => 'a588f673ac6d5ee748274b5b50bdcd1bf4847909', + 'reference' => '431d6cdedc37a05d7df634b0f7ea7dadd9a24fbd', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-roles', 'aliases' => array(), @@ -211,7 +211,7 @@ 'automattic/jetpack-stats' => array( 'pretty_version' => '0.14.1', 'version' => '0.14.1.0', - 'reference' => 'dde48f613bad5151e3dabaa5d71ccc9aefa3fba3', + 'reference' => '1550b1e0082877deb4e6f971da6c17db3280f490', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-stats', 'aliases' => array(), @@ -220,7 +220,7 @@ 'automattic/jetpack-stats-admin' => array( 'pretty_version' => '0.23.1', 'version' => '0.23.1.0', - 'reference' => '9385dc402f2cafd05acb2f22b8928db69d61a24b', + 'reference' => 'b906e7a4125d1704c89984fc89ad41836086bd63', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-stats-admin', 'aliases' => array(), @@ -229,7 +229,7 @@ 'automattic/jetpack-status' => array( 'pretty_version' => '5.0.1', 'version' => '5.0.1.0', - 'reference' => '196117097e7abdd9afd2013b0dca24109ce0258a', + 'reference' => 'd2b6081f44c8397574442cea0e19fef00dbeea7b', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-status', 'aliases' => array(), @@ -238,7 +238,7 @@ 'automattic/jetpack-sync' => array( 'pretty_version' => '4.0.1', 'version' => '4.0.1.0', - 'reference' => 'f01a93a5b79dbd0ddf546d0f0d77379a96f946cd', + 'reference' => '278517e1516012e59fe0e078f419c403faba24a7', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-sync', 'aliases' => array(), @@ -247,7 +247,7 @@ 'automattic/scheduled-updates' => array( 'pretty_version' => '0.14.0-alpha.1732217150', 'version' => '0.14.0.0-alpha1732217150', - 'reference' => 'b252c63ded8de362e38f0c51ac16a7e45eb7996a', + 'reference' => 'a0828229927c4b8a9f99410c26d966d554725aa7', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/scheduled-updates', 'aliases' => array(),