Plugin Directory

Changeset 3238118

Timestamp:
02/10/2025 06:32:31 PM (13 months ago)
Author:
google
Message:

Update to version 1.146.0 from GitHub

Location:
google-site-kit
Files:
100 added
96 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-site-kit/tags/1.146.0/dist/manifest.php

    r3229883 r3238118  
    2020    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2121    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    22     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0167cbd9e2a4e951c2c2.min.css", null ),
     22    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-.min.css", null ),
    2323    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-281d66e21d2b87430998.min.css", null ),
    2424    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2525    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-55d9d8bb13cf249a2389.min.css", null ),
    26     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-0e5fcb2614a2df8b4141.js", null ),
    27     'googlesitekit-runtime'                                => array( "runtime-7900ebf0cb27fa989ac7.js", null ),
    28     'googlesitekit-activation'                             => array( "googlesitekit-activation-0ff4bb4905875a3af96d.js", null ),
    29     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-1bc5a979d40644f428b9.js", null ),
    30     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-3eb079e3b867b0628d63.js", null ),
    31     'googlesitekit-api'                                    => array( "googlesitekit-api-56127018cb7e490cef83.js", null ),
    32     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-cd1b1b91f7b0b537fb1c.js", null ), array( "googlesitekit-components-gm3-8508ed7feed06dfd7cea.js", null ) ),
    33     'googlesitekit-data'                                   => array( "googlesitekit-data-0a0301705fe2a7e3ea13.js", null ),
    34     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-38cfea41da192d1bc108.js", null ),
    35     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-2a54fd2f0e87dc2c9475.js", null ),
    36     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-f7b7542d42fef36c823b.js", null ),
    37     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-1bf7f3343b392b9d3d36.js", null ),
    38     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-7de58a4f6164bf6e0b50.js", null ),
    39     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-41ce7126b0d8da211ca8.js", null ),
    40     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-4da8f8cf7c833e75c20b.js", null ),
    41     'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-3ee8a23dcaf39401f05a.js", null ),
    42     'googlesitekit-modules'                                => array( "googlesitekit-modules-3149aa67bd387f1e1ecc.js", null ),
    43     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-eda91d5656699d965a11.js", null ),
    44     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-60e0039459ccbf52f2dc.js", null ),
    45     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-e7215bb257eaff98a241.js", null ),
    46     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7e61c64f50cba689589c.js", null ),
    47     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-c83637e628e0caaef7d4.js", null ),
    48     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-ee6b9d229e6d6c34c65c.js", null ),
    49     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-ee4e9dd0a0285290e10e.js", null ),
    50     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-b2f7e90981d1eabf1a0c.js", null ),
    51     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-576ef786c988dd3d308a.js", null ),
    52     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-37387dc58c34dd8ec319.js", null ),
    53     'googlesitekit-settings'                               => array( "googlesitekit-settings-f0011b69cd7c80cd340a.js", null ),
    54     'googlesitekit-splash'                                 => array( "googlesitekit-splash-0e6568b993910dcbfb85.js", null ),
    55     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-77dfa9da5c9848070722.js", null ),
    56     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-9f86e66067a4d5d6be4f.js", null ),
    57     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-c774dda1d72e62c09f79.js", null ),
     26    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-.js", null ),
     27    'googlesitekit-runtime'                                => array( "runtime-.js", null ),
     28    'googlesitekit-activation'                             => array( "googlesitekit-activation-.js", null ),
     29    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-.js", null ),
     30    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-.js", null ),
     31    'googlesitekit-api'                                    => array( "googlesitekit-api-.js", null ),
     32    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-.js", null ) ),
     33    'googlesitekit-data'                                   => array( "googlesitekit-data-.js", null ),
     34    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-08.js", null ),
     35    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-.js", null ),
     36    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-.js", null ),
     37    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-.js", null ),
     38    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-0.js", null ),
     39    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-.js", null ),
     40    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-.js", null ),
     41    'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-.js", null ),
     42    'googlesitekit-modules'                                => array( "googlesitekit-modules-c.js", null ),
     43    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-.js", null ),
     44    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-c.js", null ),
     45    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-.js", null ),
     46    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-.js", null ),
     47    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-.js", null ),
     48    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-.js", null ),
     49    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-.js", null ),
     50    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-.js", null ),
     51    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-.js", null ),
     52    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-.js", null ),
     53    'googlesitekit-settings'                               => array( "googlesitekit-settings-.js", null ),
     54    'googlesitekit-splash'                                 => array( "googlesitekit-splash-.js", null ),
     55    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-.js", null ),
     56    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-.js", null ),
     57    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-.js", null ),
    5858);
  • google-site-kit/tags/1.146.0/google-site-kit.php

    r3229883 r3238118  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.145.0
     14 * Version:           1.14.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.145.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.14.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/tags/1.146.0/includes/Core/Storage/Post_Meta.php

    r3118692 r3238118  
    1818 * @ignore
    1919 */
    20 final class Post_Meta implements Post_Meta_Interface {
     20final class Post_Meta implements Meta_Interface {
    2121
    2222    /**
  • google-site-kit/tags/1.146.0/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php

    r3229883 r3238118  
    137137        return array(
    138138            'first_party_mode_is_enabled'               => array(
    139                 'label' => __( 'First-party mode: Enabled', 'google-site-kit' ),
    140                 'value' => $this->health_check_debug_field_value( $settings['isEnabled'] ),
     139                'label' => __( 'First-party mode', 'google-site-kit' ),
     140                'value' => ),
    141141                'debug' => $this->health_check_debug_field_debug( $settings['isEnabled'] ),
    142142            ),
  • google-site-kit/tags/1.146.0/includes/Core/Util/Reset.php

    r3118692 r3238118  
    113113        $this->delete_user_options( 'site' );
    114114        $this->delete_post_meta( 'site' );
     115
    115116
    116117        if ( $this->context->is_network_mode() ) {
     
    118119            $this->delete_user_options( 'network' );
    119120            $this->delete_post_meta( 'network' );
     121
    120122        }
    121123
     
    221223
    222224    /**
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
    223260     * Gets related REST routes.
    224261     *
  • google-site-kit/tags/1.146.0/includes/Modules/Reader_Revenue_Manager.php

    r3229883 r3238118  
    3333use Google\Site_Kit\Core\Site_Health\Debug_Data;
    3434use Google\Site_Kit\Core\Storage\Post_Meta;
     35
    3536use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard;
    3637use Google\Site_Kit\Core\Tags\Guards\Tag_Verify_Guard;
     
    3839use Google\Site_Kit\Core\Util\URL;
    3940use Google\Site_Kit\Modules\Reader_Revenue_Manager\Post_Product_ID;
     41
    4042use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings;
    41 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState;
     43use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_;
    4244use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard;
    4345use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers;
     
    7476        $this->register_scopes_hook();
    7577
    76         $synchronize_onboarding_state = new Synchronize_OnboardingState(
     78        $synchronize_(
    7779            $this,
    7880            $this->user_options
    7981        );
    80         $synchronize_onboarding_state->register();
     82        $synchronize_->register();
    8183
    8284        if ( Feature_Flags::enabled( 'rrmModuleV2' ) && $this->is_connected() ) {
     
    8587            $post_product_id = new Post_Product_ID( $post_meta, $publication_id );
    8688            $post_product_id->register();
    87         }
    88 
    89         add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
    90         add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
     89
     90            $term_meta       = new Term_Meta();
     91            $term_product_id = new Term_Product_ID( $term_meta, $publication_id );
     92            $term_product_id->register();
     93        }
     94
     95        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
     96        add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
    9197
    9298        // Reader Revenue Manager tag placement logic.
  • google-site-kit/tags/1.146.0/includes/Modules/Reader_Revenue_Manager/Post_Product_ID.php

    r3229883 r3238118  
    1212
    1313use Google\Site_Kit\Core\Storage\Post_Meta;
    14 use Google\Site_Kit\Core\Storage\Post_Meta_Setting;
     14use Google\Site_Kit\Core\Storage\;
    1515
    1616/**
     
    2121 * @ignore
    2222 */
    23 class Post_Product_ID extends Post_Meta_Setting {
     23class Post_Product_ID {
     24
     25    use Meta_Setting_Trait;
     26
    2427    /**
    2528     * Publication ID.
     
    4043     */
    4144    public function __construct( Post_Meta $post_meta, string $publication_id ) {
    42         parent::__construct( $post_meta );
    43 
     45        $this->meta           = $post_meta;
    4446        $this->publication_id = $publication_id;
    4547    }
     
    5759
    5860    /**
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
    5972     * Gets the `show_in_rest` value for this postmeta setting value.
    6073     *
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google.php

    r3229883 r3238118  
    8282
    8383    /**
     84
     85
     86
     87
     88
     89
     90
     91
    8492     * Constructor.
    8593     *
     
    101109        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    102110        $this->existing_client_id = new Existing_Client_ID( $this->options );
     111
    103112    }
    104113
     
    112121        add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) );
    113122
    114         add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_existing_client_id' ), 10 );
     123        add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_' ), 10 );
    115124
    116125        add_action(
     
    309318
    310319    /**
    311      * Renders the Sign in with Google JS script tags, One-tap code, and
     320     * Renders the Sign in with Google JS script tags, Oneap code, and
    312321     * buttons.
    313322     *
     
    329338
    330339        // If this is not the WordPress or WooCommerce login page, check to
    331         // see if "One-tap enabled on all pages" is set first. If it isnt:
     340        // see if "Oneap enabled on all pages" is set first. If it isnt:
    332341        // don't render the Sign in with Google JS.
    333342        if ( ! $is_wp_login && ! $is_woocommerce_login && ! $settings['oneTapOnAllPages'] ) {
     
    353362        // Whether buttons will be rendered/transformed on this page.
    354363        $render_buttons = $is_wp_login || $is_woocommerce_login;
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
    355377
    356378        // Render the Sign in with Google script.
     
    369391                body: new URLSearchParams( response )
    370392            } );
    371             if ( res.ok && res.redirected ) {
    372                 location.assign( res.url );
    373             }
     393
     394            <?php if ( empty( $redirect_to ) && ! $render_buttons && $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     395                location.reload();
     396            <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     397                if ( res.ok && res.redirected ) {
     398                    location.assign( res.url );
     399                }
     400            <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    374401        } catch( error ) {
    375402            console.error( error );
     
    391418
    392419        <?php if ( $is_woocommerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    393             for ( const login of document.getElementsByClassName( 'login' ) ) {
    394                 login.insertBefore( parent, login.firstChild );
     420            parent.classList.add( 'woocommerce-form-row', 'form-row' );
     421            const form = document.querySelector( '.woocommerce-form.login' );
     422            if ( form ) {
     423                form.insertBefore( parent, form.firstChild );
    395424            }
    396425        <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    397426
    398427        google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> );
    399 
    400         <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    401             const expires = new Date();
    402             expires.setTime( expires.getTime() + 300000 );<?php // 5 minutes ?>
    403             document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires="  + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    404         <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    405428    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    406429
    407     <?php if ( ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     430    <?php if ( ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    408431        google.accounts.id.prompt();
     432
     433
     434
     435
     436
     437
    409438    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    410439} )();
     
    480509            'sign_in_with_google_use_snippet'              => array(
    481510                /* translators: %s: Sign in with Google service name */
    482                 'label' => sprintf( __( '%s: One-tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
     511                'label' => sprintf( __( '%s: Oneap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
    483512                'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ),
    484513                'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no',
     
    530559        $wp_login_url = wp_login_url();
    531560
    532         $woo_commerce = new WooCommerce( $this->context );
    533         if ( $woo_commerce->is_active() ) {
     561        if ( $this->woocommerce->is_active() ) {
    534562            $wc_login_page_id = wc_get_page_id( 'myaccount' );
    535563            $wc_login_url     = get_permalink( $wc_login_page_id );
     
    670698
    671699    /**
    672      * Exposes an existing client ID from a previous connection
    673      * to JS via _googlesitekitModulesData.
     700     * Exposes inline module data to JS via _googlesitekitModulesData.
    674701     *
    675702     * @since 1.142.0
     703
    676704     *
    677705     * @param array $modules_data Inline modules data.
    678706     * @return array Inline modules data.
    679707     */
    680     protected function inline_existing_client_id( $modules_data ) {
     708    protected function inline_module_data( $modules_data ) {
     709        $inline_data = array();
     710
    681711        $existing_client_id = $this->existing_client_id->get();
    682 
    683712        if ( $existing_client_id ) {
    684             // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
    685             $modules_data['sign-in-with-google'] = array(
    686                 'existingClientID' => $existing_client_id,
    687             );
    688         }
     713            $inline_data['existingClientID'] = $existing_client_id;
     714        }
     715
     716        $is_woocommerce_active            = $this->woocommerce->is_active();
     717        $woocommerce_registration_enabled = $is_woocommerce_active ? get_option( 'woocommerce_enable_myaccount_registration' ) : null;
     718
     719        $inline_data['isWooCommerceActive']              = $is_woocommerce_active;
     720        $inline_data['isWooCommerceRegistrationEnabled'] = $is_woocommerce_active && 'yes' === $woocommerce_registration_enabled;
     721
     722        // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
     723        $modules_data['sign-in-with-google'] = $inline_data;
    689724
    690725        return $modules_data;
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google/Authenticator.php

    r3229883 r3238118  
    134134
    135135        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
    136         $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     136        $cookie_redirect_to = $ );
    137137        if ( ! empty( $cookie_redirect_to ) ) {
    138138            $redirect_to = $cookie_redirect_to;
    139 
    140             if ( ! headers_sent() ) {
    141                 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
    142                 setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
    143             }
    144139        }
    145140
     
    335330        return dirname( wp_parse_url( wp_login_url(), PHP_URL_PATH ) );
    336331    }
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
    337350}
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google/WooCommerce_Authenticator.php

    r3229883 r3238118  
    4343     *
    4444     * @since 1.145.0
     45
    4546     *
    4647     * @param WP_User $user User object.
     
    4950     */
    5051    protected function get_redirect_url( $user, $input ) {
    51         $redirect = wc_get_page_permalink( 'myaccount' );
    52         return apply_filters( 'woocommerce_login_redirect', $redirect, $user );
     52        $redirect_to = wc_get_page_permalink( 'myaccount' );
     53
     54        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
     55        $cookie_redirect_to = $this->get_cookie_redirect( $input );
     56        if ( ! empty( $cookie_redirect_to ) ) {
     57            $redirect_to = $cookie_redirect_to;
     58        }
     59
     60        return apply_filters( 'woocommerce_login_redirect', $redirect_to, $user );
    5361    }
    5462}
  • google-site-kit/tags/1.146.0/includes/vendor/composer/autoload_classmap.php

    r3229883 r3238118  
    158158    'Google\\Site_Kit\\Core\\Storage\\Encrypted_Options' => $baseDir . '/Core/Storage/Encrypted_Options.php',
    159159    'Google\\Site_Kit\\Core\\Storage\\Encrypted_User_Options' => $baseDir . '/Core/Storage/Encrypted_User_Options.php',
     160
     161
    160162    'Google\\Site_Kit\\Core\\Storage\\Options' => $baseDir . '/Core/Storage/Options.php',
    161163    'Google\\Site_Kit\\Core\\Storage\\Options_Interface' => $baseDir . '/Core/Storage/Options_Interface.php',
    162164    'Google\\Site_Kit\\Core\\Storage\\Post_Meta' => $baseDir . '/Core/Storage/Post_Meta.php',
    163     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Interface' => $baseDir . '/Core/Storage/Post_Meta_Interface.php',
    164     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Setting' => $baseDir . '/Core/Storage/Post_Meta_Setting.php',
    165165    'Google\\Site_Kit\\Core\\Storage\\Setting' => $baseDir . '/Core/Storage/Setting.php',
    166166    'Google\\Site_Kit\\Core\\Storage\\Setting\\List_Setting' => $baseDir . '/Core/Storage/Setting/List_Setting.php',
     
    169169    'Google\\Site_Kit\\Core\\Storage\\Setting_With_Owned_Keys_Trait' => $baseDir . '/Core/Storage/Setting_With_Owned_Keys_Trait.php',
    170170    'Google\\Site_Kit\\Core\\Storage\\Setting_With_ViewOnly_Keys_Interface' => $baseDir . '/Core/Storage/Setting_With_ViewOnly_Keys_Interface.php',
     171
    171172    'Google\\Site_Kit\\Core\\Storage\\Transients' => $baseDir . '/Core/Storage/Transients.php',
    172173    'Google\\Site_Kit\\Core\\Storage\\User_Aware_Interface' => $baseDir . '/Core/Storage/User_Aware_Interface.php',
     
    310311    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Post_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Post_Product_ID.php',
    311312    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php',
    312     'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php',
     313    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_.php',
    313314    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php',
    314315    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php',
     316
    315317    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Web_Tag' => $baseDir . '/Modules/Reader_Revenue_Manager/Web_Tag.php',
    316318    'Google\\Site_Kit\\Modules\\Search_Console' => $baseDir . '/Modules/Search_Console.php',
  • google-site-kit/tags/1.146.0/readme.txt

    r3229883 r3238118  
    55Tested up to:      6.7
    66Requires PHP:      7.4
    7 Stable tag:        1.145.0
     7Stable tag:        1.14.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.145.0 =
     112= 1.14.0 =
    113113
    114114**Enhanced**
    115115
    116 * Add Site Health information for Reader Revenue Manager expansions. See [#9974](https://github.com/google/site-kit-wp/issues/9974).
    117 * Add an empty RRM V2 JavaScript entry point for the WordPress block editor, with functionality to be added in subsequent issues. See [#9957](https://github.com/google/site-kit-wp/issues/9957).
    118 * Add mechanism to store post-level Reader Revenue Manager settings. See [#9955](https://github.com/google/site-kit-wp/issues/9955).
    119 * Update Reader Revenue Manager module settings infrastructure. See [#9951](https://github.com/google/site-kit-wp/issues/9951).
    120 * Add a trigger for a survey when the user sees the FPM setup banner, and one when the user enables FPM, in order to help track usage of the feature. See [#9940](https://github.com/google/site-kit-wp/issues/9940).
    121 * Update copy on disconnect module modal. See [#9935](https://github.com/google/site-kit-wp/issues/9935).
    122 * Standardize the capitalization of "First-party mode" across the plugin for consistency. See [#9902](https://github.com/google/site-kit-wp/issues/9902).
    123 * Ensure the Reader Revenue Manager Setup CTA does not appear alongside other CTAs. See [#9889](https://github.com/google/site-kit-wp/issues/9889).
    124 * Add error handling to the First-party mode setup banner to display errors and prevent premature dismissal when saving settings fail. See [#9846](https://github.com/google/site-kit-wp/issues/9846).
    125 * Update auth error notification to use new notifications infrastructure. See [#9284](https://github.com/google/site-kit-wp/issues/9284).
    126 * Update tooltip tours to display on smaller screen sizes. See [#3003](https://github.com/google/site-kit-wp/issues/3003).
     116* Add warning to users when Sign in with Google One-tap appears site-wide without open user registrations. See [#10079](https://github.com/google/site-kit-wp/issues/10079).
     117* Update the Reader Revenue Manager settings view screen to include new settings introduced in Phase 2. See [#10067](https://github.com/google/site-kit-wp/issues/10067).
     118* Add a reusable chip multi-select component. See [#10064](https://github.com/google/site-kit-wp/issues/10064).
     119* Update the Reader Revenue Manager setup CTA banner copy to highlight paywall support when the feature flag is enabled. See [#10063](https://github.com/google/site-kit-wp/issues/10063).
     120* Add mechanism to clear term meta on Site Kit reset. See [#10061](https://github.com/google/site-kit-wp/issues/10061).
     121* Add mechanism to store term-level Reader Revenue Manager settings. See [#9956](https://github.com/google/site-kit-wp/issues/9956).
     122* Add mechanism to synchronize Reader Revenue Manager publication information. See [#9954](https://github.com/google/site-kit-wp/issues/9954).
     123* Add mechanism to reset publication-specific information when the publication is changed. See [#9953](https://github.com/google/site-kit-wp/issues/9953).
     124* Update Reader Revenue Manager publication selection to populate new settings. See [#9952](https://github.com/google/site-kit-wp/issues/9952).
     125* Add infrastructure to interface with WordPress term metadata. See [#9949](https://github.com/google/site-kit-wp/issues/9949).
     126* Improve the styling of the Sign in with Google button on WooCommerce login forms. See [#9932](https://github.com/google/site-kit-wp/issues/9932).
     127* Update Ads settings view screen to display items in the correct order. See [#9908](https://github.com/google/site-kit-wp/issues/9908).
     128* Update the First-party mode status in Site Health to use "Enabled" or "Disabled" instead of "Yes" or "No" and update the label from "First-party mode: Enabled" to "First-party mode". See [#9904](https://github.com/google/site-kit-wp/issues/9904).
     129* Refactor consent mode setup CTA to use new infrastructure. See [#9887](https://github.com/google/site-kit-wp/issues/9887).
     130* Update the Audience Segmentation Setup CTA so it does not appear alongside other CTAs. See [#9886](https://github.com/google/site-kit-wp/issues/9886).
     131* Update visitor group card to prevent including `(not set)` in cities with the most visitors. See [#9604](https://github.com/google/site-kit-wp/issues/9604).
    127132
    128133**Changed**
    129134
    130 * Update the service provisioning URL not to contain the `supportemail` query param. See [#10024](https://github.com/google/site-kit-wp/issues/10024).
     135* ).
    131136
    132137**Fixed**
    133138
    134 * Fix custom dimension metric tiles error when loaded on the KMW widget with the ACR feature flag enabled. See [#9967](https://github.com/google/site-kit-wp/issues/9967).
    135 * Improve redirects when Sign in with Google login fails on WooCommerce pages. See [#9780](https://github.com/google/site-kit-wp/issues/9780).
     139* Improve reliability of Sign in with Google rendering on WooCommerce account pages. See [#10120](https://github.com/google/site-kit-wp/issues/10120).
     140* Fix bug that could cause CTA to add new metrics to Analytics. See [#10044](https://github.com/google/site-kit-wp/issues/10044).
     141* Fix bug that caused the "Top traffic source driving leads" metric to show no data in the "90 days" view. See [#10043](https://github.com/google/site-kit-wp/issues/10043).
     142* Fix bug that could cause metrics not to update properly if answers were changed several times before saving changes. See [#10034](https://github.com/google/site-kit-wp/issues/10034).
     143* Ensure suggested metrics include new events. See [#10033](https://github.com/google/site-kit-wp/issues/10033).
     144* Fix user registration notification dismissal issue on the Sign in with Google settings screen. See [#9933](https://github.com/google/site-kit-wp/issues/9933).
     145* Fix key metrics setup CTA layout at 960px. See [#9911](https://github.com/google/site-kit-wp/issues/9911).
    136146
    137147[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
  • google-site-kit/trunk/dist/manifest.php

    r3229883 r3238118  
    2020    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2121    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    22     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0167cbd9e2a4e951c2c2.min.css", null ),
     22    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-.min.css", null ),
    2323    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-281d66e21d2b87430998.min.css", null ),
    2424    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2525    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-55d9d8bb13cf249a2389.min.css", null ),
    26     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-0e5fcb2614a2df8b4141.js", null ),
    27     'googlesitekit-runtime'                                => array( "runtime-7900ebf0cb27fa989ac7.js", null ),
    28     'googlesitekit-activation'                             => array( "googlesitekit-activation-0ff4bb4905875a3af96d.js", null ),
    29     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-1bc5a979d40644f428b9.js", null ),
    30     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-3eb079e3b867b0628d63.js", null ),
    31     'googlesitekit-api'                                    => array( "googlesitekit-api-56127018cb7e490cef83.js", null ),
    32     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-cd1b1b91f7b0b537fb1c.js", null ), array( "googlesitekit-components-gm3-8508ed7feed06dfd7cea.js", null ) ),
    33     'googlesitekit-data'                                   => array( "googlesitekit-data-0a0301705fe2a7e3ea13.js", null ),
    34     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-38cfea41da192d1bc108.js", null ),
    35     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-2a54fd2f0e87dc2c9475.js", null ),
    36     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-f7b7542d42fef36c823b.js", null ),
    37     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-1bf7f3343b392b9d3d36.js", null ),
    38     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-7de58a4f6164bf6e0b50.js", null ),
    39     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-41ce7126b0d8da211ca8.js", null ),
    40     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-4da8f8cf7c833e75c20b.js", null ),
    41     'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-3ee8a23dcaf39401f05a.js", null ),
    42     'googlesitekit-modules'                                => array( "googlesitekit-modules-3149aa67bd387f1e1ecc.js", null ),
    43     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-eda91d5656699d965a11.js", null ),
    44     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-60e0039459ccbf52f2dc.js", null ),
    45     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-e7215bb257eaff98a241.js", null ),
    46     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7e61c64f50cba689589c.js", null ),
    47     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-c83637e628e0caaef7d4.js", null ),
    48     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-ee6b9d229e6d6c34c65c.js", null ),
    49     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-ee4e9dd0a0285290e10e.js", null ),
    50     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-b2f7e90981d1eabf1a0c.js", null ),
    51     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-576ef786c988dd3d308a.js", null ),
    52     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-37387dc58c34dd8ec319.js", null ),
    53     'googlesitekit-settings'                               => array( "googlesitekit-settings-f0011b69cd7c80cd340a.js", null ),
    54     'googlesitekit-splash'                                 => array( "googlesitekit-splash-0e6568b993910dcbfb85.js", null ),
    55     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-77dfa9da5c9848070722.js", null ),
    56     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-9f86e66067a4d5d6be4f.js", null ),
    57     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-c774dda1d72e62c09f79.js", null ),
     26    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-.js", null ),
     27    'googlesitekit-runtime'                                => array( "runtime-.js", null ),
     28    'googlesitekit-activation'                             => array( "googlesitekit-activation-.js", null ),
     29    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-.js", null ),
     30    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-.js", null ),
     31    'googlesitekit-api'                                    => array( "googlesitekit-api-.js", null ),
     32    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-.js", null ) ),
     33    'googlesitekit-data'                                   => array( "googlesitekit-data-.js", null ),
     34    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-08.js", null ),
     35    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-.js", null ),
     36    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-.js", null ),
     37    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-.js", null ),
     38    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-0.js", null ),
     39    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-.js", null ),
     40    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-.js", null ),
     41    'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-.js", null ),
     42    'googlesitekit-modules'                                => array( "googlesitekit-modules-c.js", null ),
     43    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-.js", null ),
     44    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-c.js", null ),
     45    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-.js", null ),
     46    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-.js", null ),
     47    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-.js", null ),
     48    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-.js", null ),
     49    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-.js", null ),
     50    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-.js", null ),
     51    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-.js", null ),
     52    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-.js", null ),
     53    'googlesitekit-settings'                               => array( "googlesitekit-settings-.js", null ),
     54    'googlesitekit-splash'                                 => array( "googlesitekit-splash-.js", null ),
     55    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-.js", null ),
     56    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-.js", null ),
     57    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-.js", null ),
    5858);
  • google-site-kit/trunk/google-site-kit.php

    r3229883 r3238118  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.145.0
     14 * Version:           1.14.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.145.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.14.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/trunk/includes/Core/Storage/Post_Meta.php

    r3118692 r3238118  
    1818 * @ignore
    1919 */
    20 final class Post_Meta implements Post_Meta_Interface {
     20final class Post_Meta implements Meta_Interface {
    2121
    2222    /**
  • google-site-kit/trunk/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php

    r3229883 r3238118  
    137137        return array(
    138138            'first_party_mode_is_enabled'               => array(
    139                 'label' => __( 'First-party mode: Enabled', 'google-site-kit' ),
    140                 'value' => $this->health_check_debug_field_value( $settings['isEnabled'] ),
     139                'label' => __( 'First-party mode', 'google-site-kit' ),
     140                'value' => ),
    141141                'debug' => $this->health_check_debug_field_debug( $settings['isEnabled'] ),
    142142            ),
  • google-site-kit/trunk/includes/Core/Util/Reset.php

    r3118692 r3238118  
    113113        $this->delete_user_options( 'site' );
    114114        $this->delete_post_meta( 'site' );
     115
    115116
    116117        if ( $this->context->is_network_mode() ) {
     
    118119            $this->delete_user_options( 'network' );
    119120            $this->delete_post_meta( 'network' );
     121
    120122        }
    121123
     
    221223
    222224    /**
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
    223260     * Gets related REST routes.
    224261     *
  • google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager.php

    r3229883 r3238118  
    3333use Google\Site_Kit\Core\Site_Health\Debug_Data;
    3434use Google\Site_Kit\Core\Storage\Post_Meta;
     35
    3536use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard;
    3637use Google\Site_Kit\Core\Tags\Guards\Tag_Verify_Guard;
     
    3839use Google\Site_Kit\Core\Util\URL;
    3940use Google\Site_Kit\Modules\Reader_Revenue_Manager\Post_Product_ID;
     41
    4042use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings;
    41 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState;
     43use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_;
    4244use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard;
    4345use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers;
     
    7476        $this->register_scopes_hook();
    7577
    76         $synchronize_onboarding_state = new Synchronize_OnboardingState(
     78        $synchronize_(
    7779            $this,
    7880            $this->user_options
    7981        );
    80         $synchronize_onboarding_state->register();
     82        $synchronize_->register();
    8183
    8284        if ( Feature_Flags::enabled( 'rrmModuleV2' ) && $this->is_connected() ) {
     
    8587            $post_product_id = new Post_Product_ID( $post_meta, $publication_id );
    8688            $post_product_id->register();
    87         }
    88 
    89         add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
    90         add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
     89
     90            $term_meta       = new Term_Meta();
     91            $term_product_id = new Term_Product_ID( $term_meta, $publication_id );
     92            $term_product_id->register();
     93        }
     94
     95        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
     96        add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
    9197
    9298        // Reader Revenue Manager tag placement logic.
  • google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Post_Product_ID.php

    r3229883 r3238118  
    1212
    1313use Google\Site_Kit\Core\Storage\Post_Meta;
    14 use Google\Site_Kit\Core\Storage\Post_Meta_Setting;
     14use Google\Site_Kit\Core\Storage\;
    1515
    1616/**
     
    2121 * @ignore
    2222 */
    23 class Post_Product_ID extends Post_Meta_Setting {
     23class Post_Product_ID {
     24
     25    use Meta_Setting_Trait;
     26
    2427    /**
    2528     * Publication ID.
     
    4043     */
    4144    public function __construct( Post_Meta $post_meta, string $publication_id ) {
    42         parent::__construct( $post_meta );
    43 
     45        $this->meta           = $post_meta;
    4446        $this->publication_id = $publication_id;
    4547    }
     
    5759
    5860    /**
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
    5972     * Gets the `show_in_rest` value for this postmeta setting value.
    6073     *
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google.php

    r3229883 r3238118  
    8282
    8383    /**
     84
     85
     86
     87
     88
     89
     90
     91
    8492     * Constructor.
    8593     *
     
    101109        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    102110        $this->existing_client_id = new Existing_Client_ID( $this->options );
     111
    103112    }
    104113
     
    112121        add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) );
    113122
    114         add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_existing_client_id' ), 10 );
     123        add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_' ), 10 );
    115124
    116125        add_action(
     
    309318
    310319    /**
    311      * Renders the Sign in with Google JS script tags, One-tap code, and
     320     * Renders the Sign in with Google JS script tags, Oneap code, and
    312321     * buttons.
    313322     *
     
    329338
    330339        // If this is not the WordPress or WooCommerce login page, check to
    331         // see if "One-tap enabled on all pages" is set first. If it isnt:
     340        // see if "Oneap enabled on all pages" is set first. If it isnt:
    332341        // don't render the Sign in with Google JS.
    333342        if ( ! $is_wp_login && ! $is_woocommerce_login && ! $settings['oneTapOnAllPages'] ) {
     
    353362        // Whether buttons will be rendered/transformed on this page.
    354363        $render_buttons = $is_wp_login || $is_woocommerce_login;
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
    355377
    356378        // Render the Sign in with Google script.
     
    369391                body: new URLSearchParams( response )
    370392            } );
    371             if ( res.ok && res.redirected ) {
    372                 location.assign( res.url );
    373             }
     393
     394            <?php if ( empty( $redirect_to ) && ! $render_buttons && $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     395                location.reload();
     396            <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     397                if ( res.ok && res.redirected ) {
     398                    location.assign( res.url );
     399                }
     400            <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    374401        } catch( error ) {
    375402            console.error( error );
     
    391418
    392419        <?php if ( $is_woocommerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    393             for ( const login of document.getElementsByClassName( 'login' ) ) {
    394                 login.insertBefore( parent, login.firstChild );
     420            parent.classList.add( 'woocommerce-form-row', 'form-row' );
     421            const form = document.querySelector( '.woocommerce-form.login' );
     422            if ( form ) {
     423                form.insertBefore( parent, form.firstChild );
    395424            }
    396425        <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    397426
    398427        google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> );
    399 
    400         <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    401             const expires = new Date();
    402             expires.setTime( expires.getTime() + 300000 );<?php // 5 minutes ?>
    403             document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires="  + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    404         <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    405428    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    406429
    407     <?php if ( ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     430    <?php if ( ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    408431        google.accounts.id.prompt();
     432
     433
     434
     435
     436
     437
    409438    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    410439} )();
     
    480509            'sign_in_with_google_use_snippet'              => array(
    481510                /* translators: %s: Sign in with Google service name */
    482                 'label' => sprintf( __( '%s: One-tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
     511                'label' => sprintf( __( '%s: Oneap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
    483512                'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ),
    484513                'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no',
     
    530559        $wp_login_url = wp_login_url();
    531560
    532         $woo_commerce = new WooCommerce( $this->context );
    533         if ( $woo_commerce->is_active() ) {
     561        if ( $this->woocommerce->is_active() ) {
    534562            $wc_login_page_id = wc_get_page_id( 'myaccount' );
    535563            $wc_login_url     = get_permalink( $wc_login_page_id );
     
    670698
    671699    /**
    672      * Exposes an existing client ID from a previous connection
    673      * to JS via _googlesitekitModulesData.
     700     * Exposes inline module data to JS via _googlesitekitModulesData.
    674701     *
    675702     * @since 1.142.0
     703
    676704     *
    677705     * @param array $modules_data Inline modules data.
    678706     * @return array Inline modules data.
    679707     */
    680     protected function inline_existing_client_id( $modules_data ) {
     708    protected function inline_module_data( $modules_data ) {
     709        $inline_data = array();
     710
    681711        $existing_client_id = $this->existing_client_id->get();
    682 
    683712        if ( $existing_client_id ) {
    684             // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
    685             $modules_data['sign-in-with-google'] = array(
    686                 'existingClientID' => $existing_client_id,
    687             );
    688         }
     713            $inline_data['existingClientID'] = $existing_client_id;
     714        }
     715
     716        $is_woocommerce_active            = $this->woocommerce->is_active();
     717        $woocommerce_registration_enabled = $is_woocommerce_active ? get_option( 'woocommerce_enable_myaccount_registration' ) : null;
     718
     719        $inline_data['isWooCommerceActive']              = $is_woocommerce_active;
     720        $inline_data['isWooCommerceRegistrationEnabled'] = $is_woocommerce_active && 'yes' === $woocommerce_registration_enabled;
     721
     722        // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
     723        $modules_data['sign-in-with-google'] = $inline_data;
    689724
    690725        return $modules_data;
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google/Authenticator.php

    r3229883 r3238118  
    134134
    135135        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
    136         $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     136        $cookie_redirect_to = $ );
    137137        if ( ! empty( $cookie_redirect_to ) ) {
    138138            $redirect_to = $cookie_redirect_to;
    139 
    140             if ( ! headers_sent() ) {
    141                 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
    142                 setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
    143             }
    144139        }
    145140
     
    335330        return dirname( wp_parse_url( wp_login_url(), PHP_URL_PATH ) );
    336331    }
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
    337350}
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google/WooCommerce_Authenticator.php

    r3229883 r3238118  
    4343     *
    4444     * @since 1.145.0
     45
    4546     *
    4647     * @param WP_User $user User object.
     
    4950     */
    5051    protected function get_redirect_url( $user, $input ) {
    51         $redirect = wc_get_page_permalink( 'myaccount' );
    52         return apply_filters( 'woocommerce_login_redirect', $redirect, $user );
     52        $redirect_to = wc_get_page_permalink( 'myaccount' );
     53
     54        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
     55        $cookie_redirect_to = $this->get_cookie_redirect( $input );
     56        if ( ! empty( $cookie_redirect_to ) ) {
     57            $redirect_to = $cookie_redirect_to;
     58        }
     59
     60        return apply_filters( 'woocommerce_login_redirect', $redirect_to, $user );
    5361    }
    5462}
  • google-site-kit/trunk/includes/vendor/composer/autoload_classmap.php

    r3229883 r3238118  
    158158    'Google\\Site_Kit\\Core\\Storage\\Encrypted_Options' => $baseDir . '/Core/Storage/Encrypted_Options.php',
    159159    'Google\\Site_Kit\\Core\\Storage\\Encrypted_User_Options' => $baseDir . '/Core/Storage/Encrypted_User_Options.php',
     160
     161
    160162    'Google\\Site_Kit\\Core\\Storage\\Options' => $baseDir . '/Core/Storage/Options.php',
    161163    'Google\\Site_Kit\\Core\\Storage\\Options_Interface' => $baseDir . '/Core/Storage/Options_Interface.php',
    162164    'Google\\Site_Kit\\Core\\Storage\\Post_Meta' => $baseDir . '/Core/Storage/Post_Meta.php',
    163     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Interface' => $baseDir . '/Core/Storage/Post_Meta_Interface.php',
    164     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Setting' => $baseDir . '/Core/Storage/Post_Meta_Setting.php',
    165165    'Google\\Site_Kit\\Core\\Storage\\Setting' => $baseDir . '/Core/Storage/Setting.php',
    166166    'Google\\Site_Kit\\Core\\Storage\\Setting\\List_Setting' => $baseDir . '/Core/Storage/Setting/List_Setting.php',
     
    169169    'Google\\Site_Kit\\Core\\Storage\\Setting_With_Owned_Keys_Trait' => $baseDir . '/Core/Storage/Setting_With_Owned_Keys_Trait.php',
    170170    'Google\\Site_Kit\\Core\\Storage\\Setting_With_ViewOnly_Keys_Interface' => $baseDir . '/Core/Storage/Setting_With_ViewOnly_Keys_Interface.php',
     171
    171172    'Google\\Site_Kit\\Core\\Storage\\Transients' => $baseDir . '/Core/Storage/Transients.php',
    172173    'Google\\Site_Kit\\Core\\Storage\\User_Aware_Interface' => $baseDir . '/Core/Storage/User_Aware_Interface.php',
     
    310311    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Post_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Post_Product_ID.php',
    311312    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php',
    312     'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php',
     313    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_.php',
    313314    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php',
    314315    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php',
     316
    315317    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Web_Tag' => $baseDir . '/Modules/Reader_Revenue_Manager/Web_Tag.php',
    316318    'Google\\Site_Kit\\Modules\\Search_Console' => $baseDir . '/Modules/Search_Console.php',
  • google-site-kit/trunk/readme.txt

    r3229883 r3238118  
    55Tested up to:      6.7
    66Requires PHP:      7.4
    7 Stable tag:        1.145.0
     7Stable tag:        1.14.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.145.0 =
     112= 1.14.0 =
    113113
    114114**Enhanced**
    115115
    116 * Add Site Health information for Reader Revenue Manager expansions. See [#9974](https://github.com/google/site-kit-wp/issues/9974).
    117 * Add an empty RRM V2 JavaScript entry point for the WordPress block editor, with functionality to be added in subsequent issues. See [#9957](https://github.com/google/site-kit-wp/issues/9957).
    118 * Add mechanism to store post-level Reader Revenue Manager settings. See [#9955](https://github.com/google/site-kit-wp/issues/9955).
    119 * Update Reader Revenue Manager module settings infrastructure. See [#9951](https://github.com/google/site-kit-wp/issues/9951).
    120 * Add a trigger for a survey when the user sees the FPM setup banner, and one when the user enables FPM, in order to help track usage of the feature. See [#9940](https://github.com/google/site-kit-wp/issues/9940).
    121 * Update copy on disconnect module modal. See [#9935](https://github.com/google/site-kit-wp/issues/9935).
    122 * Standardize the capitalization of "First-party mode" across the plugin for consistency. See [#9902](https://github.com/google/site-kit-wp/issues/9902).
    123 * Ensure the Reader Revenue Manager Setup CTA does not appear alongside other CTAs. See [#9889](https://github.com/google/site-kit-wp/issues/9889).
    124 * Add error handling to the First-party mode setup banner to display errors and prevent premature dismissal when saving settings fail. See [#9846](https://github.com/google/site-kit-wp/issues/9846).
    125 * Update auth error notification to use new notifications infrastructure. See [#9284](https://github.com/google/site-kit-wp/issues/9284).
    126 * Update tooltip tours to display on smaller screen sizes. See [#3003](https://github.com/google/site-kit-wp/issues/3003).
     116* Add warning to users when Sign in with Google One-tap appears site-wide without open user registrations. See [#10079](https://github.com/google/site-kit-wp/issues/10079).
     117* Update the Reader Revenue Manager settings view screen to include new settings introduced in Phase 2. See [#10067](https://github.com/google/site-kit-wp/issues/10067).
     118* Add a reusable chip multi-select component. See [#10064](https://github.com/google/site-kit-wp/issues/10064).
     119* Update the Reader Revenue Manager setup CTA banner copy to highlight paywall support when the feature flag is enabled. See [#10063](https://github.com/google/site-kit-wp/issues/10063).
     120* Add mechanism to clear term meta on Site Kit reset. See [#10061](https://github.com/google/site-kit-wp/issues/10061).
     121* Add mechanism to store term-level Reader Revenue Manager settings. See [#9956](https://github.com/google/site-kit-wp/issues/9956).
     122* Add mechanism to synchronize Reader Revenue Manager publication information. See [#9954](https://github.com/google/site-kit-wp/issues/9954).
     123* Add mechanism to reset publication-specific information when the publication is changed. See [#9953](https://github.com/google/site-kit-wp/issues/9953).
     124* Update Reader Revenue Manager publication selection to populate new settings. See [#9952](https://github.com/google/site-kit-wp/issues/9952).
     125* Add infrastructure to interface with WordPress term metadata. See [#9949](https://github.com/google/site-kit-wp/issues/9949).
     126* Improve the styling of the Sign in with Google button on WooCommerce login forms. See [#9932](https://github.com/google/site-kit-wp/issues/9932).
     127* Update Ads settings view screen to display items in the correct order. See [#9908](https://github.com/google/site-kit-wp/issues/9908).
     128* Update the First-party mode status in Site Health to use "Enabled" or "Disabled" instead of "Yes" or "No" and update the label from "First-party mode: Enabled" to "First-party mode". See [#9904](https://github.com/google/site-kit-wp/issues/9904).
     129* Refactor consent mode setup CTA to use new infrastructure. See [#9887](https://github.com/google/site-kit-wp/issues/9887).
     130* Update the Audience Segmentation Setup CTA so it does not appear alongside other CTAs. See [#9886](https://github.com/google/site-kit-wp/issues/9886).
     131* Update visitor group card to prevent including `(not set)` in cities with the most visitors. See [#9604](https://github.com/google/site-kit-wp/issues/9604).
    127132
    128133**Changed**
    129134
    130 * Update the service provisioning URL not to contain the `supportemail` query param. See [#10024](https://github.com/google/site-kit-wp/issues/10024).
     135* ).
    131136
    132137**Fixed**
    133138
    134 * Fix custom dimension metric tiles error when loaded on the KMW widget with the ACR feature flag enabled. See [#9967](https://github.com/google/site-kit-wp/issues/9967).
    135 * Improve redirects when Sign in with Google login fails on WooCommerce pages. See [#9780](https://github.com/google/site-kit-wp/issues/9780).
     139* Improve reliability of Sign in with Google rendering on WooCommerce account pages. See [#10120](https://github.com/google/site-kit-wp/issues/10120).
     140* Fix bug that could cause CTA to add new metrics to Analytics. See [#10044](https://github.com/google/site-kit-wp/issues/10044).
     141* Fix bug that caused the "Top traffic source driving leads" metric to show no data in the "90 days" view. See [#10043](https://github.com/google/site-kit-wp/issues/10043).
     142* Fix bug that could cause metrics not to update properly if answers were changed several times before saving changes. See [#10034](https://github.com/google/site-kit-wp/issues/10034).
     143* Ensure suggested metrics include new events. See [#10033](https://github.com/google/site-kit-wp/issues/10033).
     144* Fix user registration notification dismissal issue on the Sign in with Google settings screen. See [#9933](https://github.com/google/site-kit-wp/issues/9933).
     145* Fix key metrics setup CTA layout at 960px. See [#9911](https://github.com/google/site-kit-wp/issues/9911).
    136146
    137147[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
Note: See TracChangeset for help on using the changeset viewer.