Changeset 3201134
- Timestamp:
- 12/02/2024 06:41:44 PM (13 months ago)
- Location:
- google-site-kit
- Files:
-
- 112 added
- 88 deleted
- 34 edited
- 1 copied
-
tags/1.141.0 (copied) (copied from google-site-kit/trunk)
-
tags/1.141.0/dist/assets/css/googlesitekit-admin-css-436096755512e44a2180.min.css (deleted)
-
tags/1.141.0/dist/assets/css/googlesitekit-admin-css-c7c4e28ef467fa74720d.min.css (added)
-
tags/1.141.0/dist/assets/js/32-c533183f09ee3a2373e4.js (added)
-
tags/1.141.0/dist/assets/js/32-c575110f859c19f2398f.js (deleted)
-
tags/1.141.0/dist/assets/js/33-ab0c1bd608056f7b5e28.js (added)
-
tags/1.141.0/dist/assets/js/33-ff73ade792d652311e35.js (deleted)
-
tags/1.141.0/dist/assets/js/34-9f62e70ac6c29d10e762.js (deleted)
-
tags/1.141.0/dist/assets/js/34-d58304e3cc008d9bd368.js (added)
-
tags/1.141.0/dist/assets/js/35-29930b76b6e19e059cbb.js (deleted)
-
tags/1.141.0/dist/assets/js/35-75f0c07ce1b333dae0f8.js (added)
-
tags/1.141.0/dist/assets/js/36-3cf2d6875f0ad6edbaae.js (added)
-
tags/1.141.0/dist/assets/js/36-5fb9dce594ff4f760056.js (deleted)
-
tags/1.141.0/dist/assets/js/37-cdd8ca353b480da27d6e.js (deleted)
-
tags/1.141.0/dist/assets/js/37-ee1062a625ba3e4e3ff1.js (added)
-
tags/1.141.0/dist/assets/js/38-0f9440bdb99c29af3303.js (deleted)
-
tags/1.141.0/dist/assets/js/38-6f69ffd25e84183f01ff.js (added)
-
tags/1.141.0/dist/assets/js/39-212f225e7283b84d39ee.js (deleted)
-
tags/1.141.0/dist/assets/js/39-d7e88e2bb6c68b379aae.js (added)
-
tags/1.141.0/dist/assets/js/40-5dfa70862a7a88500fe0.js (added)
-
tags/1.141.0/dist/assets/js/40-74d735dbdabc81c4411c.js (deleted)
-
tags/1.141.0/dist/assets/js/41-8a98210b27fab530d2f7.js (added)
-
tags/1.141.0/dist/assets/js/41-f89f29d47308b14e0c29.js (deleted)
-
tags/1.141.0/dist/assets/js/42-5c1673eca2352856c63d.js (added)
-
tags/1.141.0/dist/assets/js/42-da1d41341299db23d42e.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-activation-86e820f351b221f65654.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-activation-f250ffdb179ce67acd13.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-ad-blocking-recovery-35406f6b97f89119cba2.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-ad-blocking-recovery-f6e2202aedc4b9dec80a.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-adminbar-2aa4217dc92c2c92519c.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-adminbar-309ccca4cdd85f61e57c.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-api-51477bf3a499de73c6b0.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-api-63e0255bae8c37401ba1.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-components-gm2-888e11c2f889b3818fac.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-components-gm2-d1deb8243b7fe27ddfd3.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-components-gm3-26d6f652a561407fc1d9.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-components-gm3-6f888313ed0d8623cf0e.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-data-9b04ce04845587d08ef9.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-data-e2d57f0d3e8cbcde4f77.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-forms-d673eb18908574ac23e4.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-forms-f38e139a09c823fd80b9.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-location-1e7b4e4c0f10376ae735.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-location-b2b133386452785f40cd.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-site-b48fcdc028f30543c49a.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-site-d81c0033927d3f14fb1a.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-ui-bca078eceaaa8c87948d.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-ui-fbeb338baf423fe10a9a.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-user-8525155abe6c24a6b6e4.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-datastore-user-c9aee053073946d82bc6.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-entity-dashboard-909580c1ad26533618a7.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-entity-dashboard-c2c8cb7c5a812c7ef92b.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-main-dashboard-00725d6f8918d582c7be.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-main-dashboard-4a22bdd52eac618bdba0.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-ads-8294c3788d693c1aa4d1.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-ads-8fc1dc559868da9f2c36.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-adsense-86be7f15c8ab18f2c8c2.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-adsense-e7fb25a5bd63d8fcdd08.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-analytics-4-f382f0563523da5f8023.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-analytics-4-fb3e6466670e9fe98540.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-eeec4132d38e98b7da80.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-f137613a7b6e587d2f09.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-pagespeed-insights-ac9df42867d70783b841.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-pagespeed-insights-c88ecf4fb9fabd4b00ce.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-reader-revenue-manager-0aca4740f1f170a04318.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-reader-revenue-manager-fbbb8a6b54f8e8e6c506.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-search-console-338c440d2a515b691bf2.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-search-console-7ef9910074ab8c22bab3.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-sign-in-with-google-5438d79c1a357d5f1552.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-sign-in-with-google-56b980cf11ec18bc46e7.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-tagmanager-7c01bc6dc43a4de58a7e.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-modules-tagmanager-a9c1650ad917dc777a4f.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-notifications-990bda6838a2b33db477.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-notifications-e491c3e66473a45eb37c.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-polyfills-2ca995545dced5490968.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-polyfills-b3b20bb6f4276a648085.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-settings-3d397e7aeec169a6f6f7.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-settings-516d574e9df74fe6b81f.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-splash-30e76c65a9e86b793d44.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-splash-77f274ec773bb062bf6b.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-user-input-ebc5e165960a36731c7f.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-user-input-f2a4eab971b7ec745147.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-vendor-56e09129c0c5da07a38b.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-vendor-a19e0d3a9785a4679814.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-widgets-870e0a6fad71d1353b97.js (added)
-
tags/1.141.0/dist/assets/js/googlesitekit-widgets-c2422864a9b59a9a6def.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-wp-dashboard-a24f18cd5f1c8dae446d.js (deleted)
-
tags/1.141.0/dist/assets/js/googlesitekit-wp-dashboard-d26ef36f87825368c95d.js (added)
-
tags/1.141.0/dist/assets/js/runtime-28f15eb6ca67d1a2d920.js (added)
-
tags/1.141.0/dist/assets/js/runtime-ac7cb3123d0c92a4c83a.js (deleted)
-
tags/1.141.0/dist/manifest.php (modified) (1 diff)
-
tags/1.141.0/fpm (added)
-
tags/1.141.0/fpm/measurement.php (added)
-
tags/1.141.0/google-site-kit.php (modified) (2 diffs)
-
tags/1.141.0/includes/Core/Assets/Assets.php (modified) (1 diff)
-
tags/1.141.0/includes/Core/Consent_Mode/Consent_Mode.php (modified) (2 diffs)
-
tags/1.141.0/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php (modified) (1 diff)
-
tags/1.141.0/includes/Core/Site_Health/Debug_Data.php (modified) (5 diffs)
-
tags/1.141.0/includes/Core/Tags/First_Party_Mode (added)
-
tags/1.141.0/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php (added)
-
tags/1.141.0/includes/Core/Tags/First_Party_Mode/First_Party_Mode_Settings.php (added)
-
tags/1.141.0/includes/Core/Tags/First_Party_Mode/REST_First_Party_Mode_Controller.php (added)
-
tags/1.141.0/includes/Modules/AdSense.php (modified) (4 diffs)
-
tags/1.141.0/includes/Modules/Ads.php (modified) (1 diff)
-
tags/1.141.0/includes/Modules/Analytics_4.php (modified) (5 diffs)
-
tags/1.141.0/includes/Modules/Reader_Revenue_Manager.php (modified) (7 diffs)
-
tags/1.141.0/includes/Modules/Reader_Revenue_Manager/Settings.php (modified) (2 diffs)
-
tags/1.141.0/includes/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php (added)
-
tags/1.141.0/includes/Modules/Search_Console.php (modified) (1 diff)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google.php (modified) (11 diffs)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google/Authenticator.php (added)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google/Authenticator_Interface.php (added)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google/Hashed_User_ID.php (added)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google/Profile_Reader.php (added)
-
tags/1.141.0/includes/Modules/Sign_In_With_Google/Profile_Reader_Interface.php (added)
-
tags/1.141.0/includes/Modules/Tag_Manager.php (modified) (1 diff)
-
tags/1.141.0/includes/Plugin.php (modified) (1 diff)
-
tags/1.141.0/includes/vendor/composer/autoload_classmap.php (modified) (3 diffs)
-
tags/1.141.0/readme.txt (modified) (2 diffs)
-
trunk/dist/assets/css/googlesitekit-admin-css-436096755512e44a2180.min.css (deleted)
-
trunk/dist/assets/css/googlesitekit-admin-css-c7c4e28ef467fa74720d.min.css (added)
-
trunk/dist/assets/js/32-c533183f09ee3a2373e4.js (added)
-
trunk/dist/assets/js/32-c575110f859c19f2398f.js (deleted)
-
trunk/dist/assets/js/33-ab0c1bd608056f7b5e28.js (added)
-
trunk/dist/assets/js/33-ff73ade792d652311e35.js (deleted)
-
trunk/dist/assets/js/34-9f62e70ac6c29d10e762.js (deleted)
-
trunk/dist/assets/js/34-d58304e3cc008d9bd368.js (added)
-
trunk/dist/assets/js/35-29930b76b6e19e059cbb.js (deleted)
-
trunk/dist/assets/js/35-75f0c07ce1b333dae0f8.js (added)
-
trunk/dist/assets/js/36-3cf2d6875f0ad6edbaae.js (added)
-
trunk/dist/assets/js/36-5fb9dce594ff4f760056.js (deleted)
-
trunk/dist/assets/js/37-cdd8ca353b480da27d6e.js (deleted)
-
trunk/dist/assets/js/37-ee1062a625ba3e4e3ff1.js (added)
-
trunk/dist/assets/js/38-0f9440bdb99c29af3303.js (deleted)
-
trunk/dist/assets/js/38-6f69ffd25e84183f01ff.js (added)
-
trunk/dist/assets/js/39-212f225e7283b84d39ee.js (deleted)
-
trunk/dist/assets/js/39-d7e88e2bb6c68b379aae.js (added)
-
trunk/dist/assets/js/40-5dfa70862a7a88500fe0.js (added)
-
trunk/dist/assets/js/40-74d735dbdabc81c4411c.js (deleted)
-
trunk/dist/assets/js/41-8a98210b27fab530d2f7.js (added)
-
trunk/dist/assets/js/41-f89f29d47308b14e0c29.js (deleted)
-
trunk/dist/assets/js/42-5c1673eca2352856c63d.js (added)
-
trunk/dist/assets/js/42-da1d41341299db23d42e.js (deleted)
-
trunk/dist/assets/js/googlesitekit-activation-86e820f351b221f65654.js (deleted)
-
trunk/dist/assets/js/googlesitekit-activation-f250ffdb179ce67acd13.js (added)
-
trunk/dist/assets/js/googlesitekit-ad-blocking-recovery-35406f6b97f89119cba2.js (deleted)
-
trunk/dist/assets/js/googlesitekit-ad-blocking-recovery-f6e2202aedc4b9dec80a.js (added)
-
trunk/dist/assets/js/googlesitekit-adminbar-2aa4217dc92c2c92519c.js (deleted)
-
trunk/dist/assets/js/googlesitekit-adminbar-309ccca4cdd85f61e57c.js (added)
-
trunk/dist/assets/js/googlesitekit-api-51477bf3a499de73c6b0.js (added)
-
trunk/dist/assets/js/googlesitekit-api-63e0255bae8c37401ba1.js (deleted)
-
trunk/dist/assets/js/googlesitekit-components-gm2-888e11c2f889b3818fac.js (deleted)
-
trunk/dist/assets/js/googlesitekit-components-gm2-d1deb8243b7fe27ddfd3.js (added)
-
trunk/dist/assets/js/googlesitekit-components-gm3-26d6f652a561407fc1d9.js (added)
-
trunk/dist/assets/js/googlesitekit-components-gm3-6f888313ed0d8623cf0e.js (deleted)
-
trunk/dist/assets/js/googlesitekit-data-9b04ce04845587d08ef9.js (deleted)
-
trunk/dist/assets/js/googlesitekit-data-e2d57f0d3e8cbcde4f77.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-forms-d673eb18908574ac23e4.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-forms-f38e139a09c823fd80b9.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-location-1e7b4e4c0f10376ae735.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-location-b2b133386452785f40cd.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-site-b48fcdc028f30543c49a.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-site-d81c0033927d3f14fb1a.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-ui-bca078eceaaa8c87948d.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-ui-fbeb338baf423fe10a9a.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-user-8525155abe6c24a6b6e4.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-user-c9aee053073946d82bc6.js (added)
-
trunk/dist/assets/js/googlesitekit-entity-dashboard-909580c1ad26533618a7.js (added)
-
trunk/dist/assets/js/googlesitekit-entity-dashboard-c2c8cb7c5a812c7ef92b.js (deleted)
-
trunk/dist/assets/js/googlesitekit-main-dashboard-00725d6f8918d582c7be.js (added)
-
trunk/dist/assets/js/googlesitekit-main-dashboard-4a22bdd52eac618bdba0.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-ads-8294c3788d693c1aa4d1.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-ads-8fc1dc559868da9f2c36.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-adsense-86be7f15c8ab18f2c8c2.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-adsense-e7fb25a5bd63d8fcdd08.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-analytics-4-f382f0563523da5f8023.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-analytics-4-fb3e6466670e9fe98540.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-eeec4132d38e98b7da80.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-f137613a7b6e587d2f09.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-pagespeed-insights-ac9df42867d70783b841.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-pagespeed-insights-c88ecf4fb9fabd4b00ce.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-reader-revenue-manager-0aca4740f1f170a04318.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-reader-revenue-manager-fbbb8a6b54f8e8e6c506.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-search-console-338c440d2a515b691bf2.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-search-console-7ef9910074ab8c22bab3.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-sign-in-with-google-5438d79c1a357d5f1552.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-sign-in-with-google-56b980cf11ec18bc46e7.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-tagmanager-7c01bc6dc43a4de58a7e.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-tagmanager-a9c1650ad917dc777a4f.js (deleted)
-
trunk/dist/assets/js/googlesitekit-notifications-990bda6838a2b33db477.js (added)
-
trunk/dist/assets/js/googlesitekit-notifications-e491c3e66473a45eb37c.js (deleted)
-
trunk/dist/assets/js/googlesitekit-polyfills-2ca995545dced5490968.js (added)
-
trunk/dist/assets/js/googlesitekit-polyfills-b3b20bb6f4276a648085.js (deleted)
-
trunk/dist/assets/js/googlesitekit-settings-3d397e7aeec169a6f6f7.js (added)
-
trunk/dist/assets/js/googlesitekit-settings-516d574e9df74fe6b81f.js (deleted)
-
trunk/dist/assets/js/googlesitekit-splash-30e76c65a9e86b793d44.js (deleted)
-
trunk/dist/assets/js/googlesitekit-splash-77f274ec773bb062bf6b.js (added)
-
trunk/dist/assets/js/googlesitekit-user-input-ebc5e165960a36731c7f.js (deleted)
-
trunk/dist/assets/js/googlesitekit-user-input-f2a4eab971b7ec745147.js (added)
-
trunk/dist/assets/js/googlesitekit-vendor-56e09129c0c5da07a38b.js (added)
-
trunk/dist/assets/js/googlesitekit-vendor-a19e0d3a9785a4679814.js (deleted)
-
trunk/dist/assets/js/googlesitekit-widgets-870e0a6fad71d1353b97.js (added)
-
trunk/dist/assets/js/googlesitekit-widgets-c2422864a9b59a9a6def.js (deleted)
-
trunk/dist/assets/js/googlesitekit-wp-dashboard-a24f18cd5f1c8dae446d.js (deleted)
-
trunk/dist/assets/js/googlesitekit-wp-dashboard-d26ef36f87825368c95d.js (added)
-
trunk/dist/assets/js/runtime-28f15eb6ca67d1a2d920.js (added)
-
trunk/dist/assets/js/runtime-ac7cb3123d0c92a4c83a.js (deleted)
-
trunk/dist/manifest.php (modified) (1 diff)
-
trunk/fpm (added)
-
trunk/fpm/measurement.php (added)
-
trunk/google-site-kit.php (modified) (2 diffs)
-
trunk/includes/Core/Assets/Assets.php (modified) (1 diff)
-
trunk/includes/Core/Consent_Mode/Consent_Mode.php (modified) (2 diffs)
-
trunk/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php (modified) (1 diff)
-
trunk/includes/Core/Site_Health/Debug_Data.php (modified) (5 diffs)
-
trunk/includes/Core/Tags/First_Party_Mode (added)
-
trunk/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php (added)
-
trunk/includes/Core/Tags/First_Party_Mode/First_Party_Mode_Settings.php (added)
-
trunk/includes/Core/Tags/First_Party_Mode/REST_First_Party_Mode_Controller.php (added)
-
trunk/includes/Modules/AdSense.php (modified) (4 diffs)
-
trunk/includes/Modules/Ads.php (modified) (1 diff)
-
trunk/includes/Modules/Analytics_4.php (modified) (5 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager.php (modified) (7 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager/Settings.php (modified) (2 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php (added)
-
trunk/includes/Modules/Search_Console.php (modified) (1 diff)
-
trunk/includes/Modules/Sign_In_With_Google.php (modified) (11 diffs)
-
trunk/includes/Modules/Sign_In_With_Google/Authenticator.php (added)
-
trunk/includes/Modules/Sign_In_With_Google/Authenticator_Interface.php (added)
-
trunk/includes/Modules/Sign_In_With_Google/Hashed_User_ID.php (added)
-
trunk/includes/Modules/Sign_In_With_Google/Profile_Reader.php (added)
-
trunk/includes/Modules/Sign_In_With_Google/Profile_Reader_Interface.php (added)
-
trunk/includes/Modules/Tag_Manager.php (modified) (1 diff)
-
trunk/includes/Plugin.php (modified) (1 diff)
-
trunk/includes/vendor/composer/autoload_classmap.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-site-kit/tags/1.141.0/dist/manifest.php
r3191565 r3201134 19 19 'analytics-advanced-tracking' => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ), 20 20 'googlesitekit-i18n' => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ), 21 'googlesitekit-admin-css' => array( "googlesitekit-admin-css- 436096755512e44a2180.min.css", null ),21 'googlesitekit-admin-css' => array( "googlesitekit-admin-css-c7c4e28ef467fa74720d.min.css", null ), 22 22 'googlesitekit-adminbar-css' => array( "googlesitekit-adminbar-css-6db776544b37175be17f.min.css", null ), 23 23 'googlesitekit-authorize-application-css' => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ), 24 24 'googlesitekit-wp-dashboard-css' => array( "googlesitekit-wp-dashboard-css-c5417a27cb905717f9fc.min.css", null ), 25 'googlesitekit-vendor' => array( "googlesitekit-vendor- a19e0d3a9785a4679814.js", null ),26 'googlesitekit-runtime' => array( "runtime- ac7cb3123d0c92a4c83a.js", null ),27 'googlesitekit-activation' => array( "googlesitekit-activation- 86e820f351b221f65654.js", null ),28 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery- 35406f6b97f89119cba2.js", null ),29 'googlesitekit-adminbar' => array( "googlesitekit-adminbar- 2aa4217dc92c2c92519c.js", null ),30 'googlesitekit-api' => array( "googlesitekit-api- 63e0255bae8c37401ba1.js", null ),31 'googlesitekit-components' => array( array( "googlesitekit-components-gm2- 888e11c2f889b3818fac.js", null ), array( "googlesitekit-components-gm3-6f888313ed0d8623cf0e.js", null ) ),32 'googlesitekit-data' => array( "googlesitekit-data- 9b04ce04845587d08ef9.js", null ),33 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms- f38e139a09c823fd80b9.js", null ),34 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location- 1e7b4e4c0f10376ae735.js", null ),35 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site- b48fcdc028f30543c49a.js", null ),36 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui- fbeb338baf423fe10a9a.js", null ),37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user- 8525155abe6c24a6b6e4.js", null ),38 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard- c2c8cb7c5a812c7ef92b.js", null ),39 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard- 4a22bdd52eac618bdba0.js", null ),40 'googlesitekit-modules' => array( "googlesitekit-modules- f137613a7b6e587d2f09.js", null ),41 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-8 294c3788d693c1aa4d1.js", null ),42 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense- 86be7f15c8ab18f2c8c2.js", null ),43 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-f b3e6466670e9fe98540.js", null ),44 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights- c88ecf4fb9fabd4b00ce.js", null ),45 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager- 0aca4740f1f170a04318.js", null ),46 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console- 338c440d2a515b691bf2.js", null ),47 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-5 6b980cf11ec18bc46e7.js", null ),48 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager- a9c1650ad917dc777a4f.js", null ),49 'googlesitekit-notifications' => array( "googlesitekit-notifications- e491c3e66473a45eb37c.js", null ),50 'googlesitekit-polyfills' => array( "googlesitekit-polyfills- b3b20bb6f4276a648085.js", null ),51 'googlesitekit-settings' => array( "googlesitekit-settings- 516d574e9df74fe6b81f.js", null ),52 'googlesitekit-splash' => array( "googlesitekit-splash- 30e76c65a9e86b793d44.js", null ),53 'googlesitekit-user-input' => array( "googlesitekit-user-input- ebc5e165960a36731c7f.js", null ),54 'googlesitekit-widgets' => array( "googlesitekit-widgets- c2422864a9b59a9a6def.js", null ),55 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard- a24f18cd5f1c8dae446d.js", null ),25 'googlesitekit-vendor' => array( "googlesitekit-vendor-56e09129c0c5da07a38b.js", null ), 26 'googlesitekit-runtime' => array( "runtime-28f15eb6ca67d1a2d920.js", null ), 27 'googlesitekit-activation' => array( "googlesitekit-activation-f250ffdb179ce67acd13.js", null ), 28 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery-f6e2202aedc4b9dec80a.js", null ), 29 'googlesitekit-adminbar' => array( "googlesitekit-adminbar-309ccca4cdd85f61e57c.js", null ), 30 'googlesitekit-api' => array( "googlesitekit-api-51477bf3a499de73c6b0.js", null ), 31 'googlesitekit-components' => array( array( "googlesitekit-components-gm2-d1deb8243b7fe27ddfd3.js", null ), array( "googlesitekit-components-gm3-26d6f652a561407fc1d9.js", null ) ), 32 'googlesitekit-data' => array( "googlesitekit-data-e2d57f0d3e8cbcde4f77.js", null ), 33 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms-d673eb18908574ac23e4.js", null ), 34 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location-b2b133386452785f40cd.js", null ), 35 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site-d81c0033927d3f14fb1a.js", null ), 36 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui-bca078eceaaa8c87948d.js", null ), 37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user-c9aee053073946d82bc6.js", null ), 38 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard-909580c1ad26533618a7.js", null ), 39 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard-00725d6f8918d582c7be.js", null ), 40 'googlesitekit-modules' => array( "googlesitekit-modules-eeec4132d38e98b7da80.js", null ), 41 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-8fc1dc559868da9f2c36.js", null ), 42 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense-e7fb25a5bd63d8fcdd08.js", null ), 43 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-f382f0563523da5f8023.js", null ), 44 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights-ac9df42867d70783b841.js", null ), 45 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager-fbbb8a6b54f8e8e6c506.js", null ), 46 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console-7ef9910074ab8c22bab3.js", null ), 47 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-5438d79c1a357d5f1552.js", null ), 48 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager-7c01bc6dc43a4de58a7e.js", null ), 49 'googlesitekit-notifications' => array( "googlesitekit-notifications-990bda6838a2b33db477.js", null ), 50 'googlesitekit-polyfills' => array( "googlesitekit-polyfills-2ca995545dced5490968.js", null ), 51 'googlesitekit-settings' => array( "googlesitekit-settings-3d397e7aeec169a6f6f7.js", null ), 52 'googlesitekit-splash' => array( "googlesitekit-splash-77f274ec773bb062bf6b.js", null ), 53 'googlesitekit-user-input' => array( "googlesitekit-user-input-f2a4eab971b7ec745147.js", null ), 54 'googlesitekit-widgets' => array( "googlesitekit-widgets-870e0a6fad71d1353b97.js", null ), 55 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard-d26ef36f87825368c95d.js", null ), 56 56 ); -
google-site-kit/tags/1.141.0/google-site-kit.php
r3191565 r3201134 12 12 * Plugin URI: https://sitekit.withgoogle.com 13 13 * 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.14 0.014 * Version: 1.141.0 15 15 * Requires at least: 5.2 16 16 * Requires PHP: 7.4 … … 27 27 28 28 // Define most essential constants. 29 define( 'GOOGLESITEKIT_VERSION', '1.14 0.0' );29 define( 'GOOGLESITEKIT_VERSION', '1.141.0' ); 30 30 define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ ); 31 31 define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' ); -
google-site-kit/tags/1.141.0/includes/Core/Assets/Assets.php
r3148853 r3201134 731 731 732 732 $inline_data = array( 733 'homeURL' => trailingslashit( $this->context->get_canonical_home_url() ), 734 'referenceSiteURL' => esc_url_raw( trailingslashit( $site_url ) ), 735 'adminURL' => esc_url_raw( trailingslashit( admin_url() ) ), 736 'assetsURL' => esc_url_raw( $this->context->url( 'dist/assets/' ) ), 737 'widgetsAdminURL' => esc_url_raw( $this->get_widgets_admin_url() ), 738 'blogPrefix' => $wpdb->get_blog_prefix(), 739 'ampMode' => $this->context->get_amp_mode(), 740 'isNetworkMode' => $this->context->is_network_mode(), 741 'timezone' => get_option( 'timezone_string' ), 742 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), 743 'enabledFeatures' => Feature_Flags::get_enabled_features(), 744 'webStoriesActive' => defined( 'WEBSTORIES_VERSION' ), 745 'postTypes' => $this->get_post_types(), 746 'storagePrefix' => $this->get_storage_prefix(), 747 'referenceDate' => apply_filters( 'googlesitekit_reference_date', null ), 748 'productPostType' => $this->get_product_post_type(), 733 'homeURL' => trailingslashit( $this->context->get_canonical_home_url() ), 734 'referenceSiteURL' => esc_url_raw( trailingslashit( $site_url ) ), 735 'adminURL' => esc_url_raw( trailingslashit( admin_url() ) ), 736 'assetsURL' => esc_url_raw( $this->context->url( 'dist/assets/' ) ), 737 'widgetsAdminURL' => esc_url_raw( $this->get_widgets_admin_url() ), 738 'blogPrefix' => $wpdb->get_blog_prefix(), 739 'ampMode' => $this->context->get_amp_mode(), 740 'isNetworkMode' => $this->context->is_network_mode(), 741 'timezone' => get_option( 'timezone_string' ), 742 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), 743 'enabledFeatures' => Feature_Flags::get_enabled_features(), 744 'webStoriesActive' => defined( 'WEBSTORIES_VERSION' ), 745 'postTypes' => $this->get_post_types(), 746 'storagePrefix' => $this->get_storage_prefix(), 747 'referenceDate' => apply_filters( 'googlesitekit_reference_date', null ), 748 'productPostType' => $this->get_product_post_type(), 749 'anyoneCanRegister' => (bool) get_option( 'users_can_register' ), 749 750 ); 750 751 -
google-site-kit/tags/1.141.0/includes/Core/Consent_Mode/Consent_Mode.php
r3127664 r3201134 14 14 use Google\Site_Kit\Core\Assets\Script; 15 15 use Google\Site_Kit\Core\Storage\Options; 16 use Google\Site_Kit\Core\Util\BC_Functions; 16 17 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 17 18 use Plugin_Upgrader; … … 232 233 // The core Consent Mode code is in assets/js/consent-mode/consent-mode.js. 233 234 // Only code that passes data from PHP to JS should be in this file. 234 ?> 235 <!-- <?php echo esc_html__( 'Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ); ?> --> 236 <script id='google_gtagjs-js-consent-mode-data-layer'> 237 window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);} 238 gtag('consent', 'default', <?php echo wp_json_encode( $consent_defaults ); ?>); 239 window._googlesitekitConsentCategoryMap = <?php echo wp_json_encode( $consent_category_map ); ?>; 240 window._googlesitekitConsents = <?php echo wp_json_encode( $consent_defaults ); ?> 241 </script> 242 <!-- <?php echo esc_html__( 'End Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ); ?> --> 243 <?php 235 printf( "<!-- %s -->\n", esc_html__( 'Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ) ); 236 BC_Functions::wp_print_inline_script_tag( 237 join( 238 "\n", 239 array( 240 'window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}', 241 sprintf( "gtag('consent', 'default', %s);", wp_json_encode( $consent_defaults ) ), 242 sprintf( 'window._googlesitekitConsentCategoryMap = %s;', wp_json_encode( $consent_category_map ) ), 243 sprintf( 'window._googlesitekitConsents = %s;', wp_json_encode( $consent_defaults ) ), 244 ) 245 ), 246 array( 'id' => 'google_gtagjs-js-consent-mode-data-layer' ) 247 ); 248 printf( "<!-- %s -->\n", esc_html__( 'End Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ) ); 244 249 } 245 250 -
google-site-kit/tags/1.141.0/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php
r3173125 r3201134 185 185 ) 186 186 ), 187 new REST_Route( 188 'core/user/data/reset-key-metrics-selection', 189 array( 190 'methods' => WP_REST_Server::CREATABLE, 191 'callback' => function () { 192 $this->settings->merge( array( 'widgetSlugs' => array() ) ); 193 194 return new WP_REST_Response( $this->settings->get() ); 195 }, 196 'permission_callback' => $has_capabilities, 197 ) 198 ), 187 199 ); 188 200 } -
google-site-kit/tags/1.141.0/includes/Core/Site_Health/Debug_Data.php
r3156474 r3201134 15 15 use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client; 16 16 use Google\Site_Kit\Core\Conversion_Tracking\Conversion_Tracking; 17 use Google\Site_Kit\Core\Key_Metrics\Key_Metrics_Settings; 18 use Google\Site_Kit\Core\Key_Metrics\Key_Metrics_Setup_Completed_By; 17 19 use Google\Site_Kit\Core\Modules\Module; 18 20 use Google\Site_Kit\Core\Modules\Module_With_Debug_Fields; … … 196 198 $fields = array_merge( $fields, $this->get_consent_mode_fields() ); 197 199 $fields = array_merge( $fields, $this->get_module_sharing_settings_fields() ); 200 $fields = array_merge( $fields, $this->get_key_metrics_fields() ); 198 201 199 202 $fields = array_filter( … … 416 419 array( 417 420 /* translators: %s: module name */ 418 'label' => sprintf( __( '%s Shared Roles', 'google-site-kit' ), $module->name ),421 'label' => sprintf( __( '%s: Shared Roles', 'google-site-kit' ), $module->name ), 419 422 ), 420 423 $this->get_module_shared_role_names( $module_settings['sharedRoles'] ) … … 424 427 array( 425 428 /* translators: %s: module name */ 426 'label' => sprintf( __( '%s Management', 'google-site-kit' ), $module->name ),429 'label' => sprintf( __( '%s: Management', 'google-site-kit' ), $module->name ), 427 430 ), 428 431 $this->get_module_management( $module_settings['management'] ) … … 639 642 ); 640 643 } 644 645 /** 646 * Gets the key metrics status fields. 647 * 648 * @since 1.141.0 649 * 650 * @return array 651 */ 652 private function get_key_metrics_fields() { 653 $is_setup_complete = ( new Key_Metrics_Setup_Completed_By( $this->options ) )->get(); 654 $key_metrics_settings = ( new Key_Metrics_Settings( $this->user_options ) )->get(); 655 656 if ( ! $is_setup_complete ) { 657 return array( 658 'key_metrics_status' => array( 659 'label' => __( 'Key Metrics Status', 'google-site-kit' ), 660 'value' => __( 'Not setup', 'google-site-kit' ), 661 ), 662 ); 663 } 664 665 $key_metrics_status = isset( $key_metrics_settings['isWidgetHidden'] ) && $key_metrics_settings['isWidgetHidden'] ? 666 __( 'Setup and Disabled', 'google-site-kit' ) : 667 __( 'Setup and Enabled', 'google-site-kit' ); 668 669 // A minimum of 2 key metrics need to be saved to prevent "default" tailored metrics to render. 670 $key_metrics_source = isset( $key_metrics_settings['widgetSlugs'] ) && count( $key_metrics_settings['widgetSlugs'] ) > 1 ? 671 __( 'Manual Selection', 'google-site-kit' ) : 672 __( 'Tailored Metrics', 'google-site-kit' ); 673 674 return array( 675 'key_metrics_status' => array( 676 'label' => __( 'Key Metrics Status', 'google-site-kit' ), 677 'value' => $key_metrics_status, 678 ), 679 'key_metrics_source' => array( 680 'label' => __( 'Key Metrics Source', 'google-site-kit' ), 681 'value' => $key_metrics_source, 682 ), 683 ); 684 } 641 685 } -
google-site-kit/tags/1.141.0/includes/Modules/AdSense.php
r3118692 r3201134 230 230 return array( 231 231 'adsense_account_id' => array( 232 'label' => __( 'AdSense account ID', 'google-site-kit' ),232 'label' => __( 'AdSense: Account ID', 'google-site-kit' ), 233 233 'value' => $settings['accountID'], 234 234 'debug' => Debug_Data::redact_debug_value( $settings['accountID'], 7 ), 235 235 ), 236 236 'adsense_client_id' => array( 237 'label' => __( 'AdSense client ID', 'google-site-kit' ),237 'label' => __( 'AdSense: Client ID', 'google-site-kit' ), 238 238 'value' => $settings['clientID'], 239 239 'debug' => Debug_Data::redact_debug_value( $settings['clientID'], 10 ), 240 240 ), 241 241 'adsense_account_status' => array( 242 'label' => __( 'AdSense account status', 'google-site-kit' ),242 'label' => __( 'AdSense: Account status', 'google-site-kit' ), 243 243 'value' => $settings['accountStatus'], 244 244 ), 245 245 'adsense_site_status' => array( 246 'label' => __( 'AdSense site status', 'google-site-kit' ),246 'label' => __( 'AdSense: Site status', 'google-site-kit' ), 247 247 'value' => $settings['siteStatus'], 248 248 ), 249 249 'adsense_use_snippet' => array( 250 'label' => __( 'AdSense snippet placed', 'google-site-kit' ),250 'label' => __( 'AdSense: Snippet placed', 'google-site-kit' ), 251 251 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 252 252 'debug' => $settings['useSnippet'] ? 'yes' : 'no', 253 253 ), 254 254 'adsense_web_stories_adunit_id' => array( 255 'label' => __( ' Web Stories Ad Unit ID', 'google-site-kit' ),255 'label' => __( 'AdSense: Web Stories Ad Unit ID', 'google-site-kit' ), 256 256 'value' => $settings['webStoriesAdUnit'], 257 257 'debug' => $settings['webStoriesAdUnit'], 258 258 ), 259 259 'adsense_setup_completed_timestamp' => array( 260 'label' => __( 'AdSense setup completed at', 'google-site-kit' ),260 'label' => __( 'AdSense: Setup completed at', 'google-site-kit' ), 261 261 'value' => $settings['setupCompletedTimestamp'] ? date_i18n( 262 262 get_option( 'date_format' ), … … 267 267 'adsense_abr_use_snippet' => array( 268 268 'label' => __( 269 'Ad Blocking Recovery snippet placed',269 'AdSense: Ad Blocking Recovery snippet placed', 270 270 'google-site-kit' 271 271 ), … … 275 275 'adsense_abr_use_error_protection_snippet' => array( 276 276 'label' => __( 277 'Ad Blocking Recovery error protection snippet placed',277 'AdSense: Ad Blocking Recovery error protection snippet placed', 278 278 'google-site-kit' 279 279 ), … … 283 283 'adsense_abr_setup_status' => array( 284 284 'label' => __( 285 'Ad Blocking Recovery setup status',285 'AdSense: Ad Blocking Recovery setup status', 286 286 'google-site-kit' 287 287 ), -
google-site-kit/tags/1.141.0/includes/Modules/Ads.php
r3173125 r3201134 310 310 return array( 311 311 'ads_conversion_tracking_id' => array( 312 'label' => __( 'Ads Conversion Tracking ID', 'google-site-kit' ),312 'label' => __( 'Ads: Conversion Tracking ID', 'google-site-kit' ), 313 313 'value' => $settings['conversionID'], 314 314 'debug' => Debug_Data::redact_debug_value( $settings['conversionID'] ), -
google-site-kit/tags/1.141.0/includes/Modules/Analytics_4.php
r3181737 r3201134 506 506 $debug_fields = array( 507 507 'analytics_4_account_id' => array( 508 'label' => __( 'Analytics account ID', 'google-site-kit' ),508 'label' => __( 'Analytics: Account ID', 'google-site-kit' ), 509 509 'value' => $settings['accountID'], 510 510 'debug' => Debug_Data::redact_debug_value( $settings['accountID'] ), 511 511 ), 512 512 'analytics_4_property_id' => array( 513 'label' => __( 'Analytics property ID', 'google-site-kit' ),513 'label' => __( 'Analytics: Property ID', 'google-site-kit' ), 514 514 'value' => $settings['propertyID'], 515 515 'debug' => Debug_Data::redact_debug_value( $settings['propertyID'], 7 ), 516 516 ), 517 517 'analytics_4_web_data_stream_id' => array( 518 'label' => __( 'Analytics web data stream ID', 'google-site-kit' ),518 'label' => __( 'Analytics: Web Data Stream ID', 'google-site-kit' ), 519 519 'value' => $settings['webDataStreamID'], 520 520 'debug' => Debug_Data::redact_debug_value( $settings['webDataStreamID'] ), 521 521 ), 522 522 'analytics_4_measurement_id' => array( 523 'label' => __( 'Analytics measurement ID', 'google-site-kit' ),523 'label' => __( 'Analytics: Measurement ID', 'google-site-kit' ), 524 524 'value' => $settings['measurementID'], 525 525 'debug' => Debug_Data::redact_debug_value( $settings['measurementID'] ), 526 526 ), 527 527 'analytics_4_use_snippet' => array( 528 'label' => __( 'Analytics snippet placed', 'google-site-kit' ),528 'label' => __( 'Analytics: Snippet placed', 'google-site-kit' ), 529 529 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 530 530 'debug' => $settings['useSnippet'] ? 'yes' : 'no', 531 531 ), 532 532 'analytics_4_ads_conversion_id' => array( 533 'label' => __( 'Analytics Ads conversion ID', 'google-site-kit' ),533 'label' => __( 'Analytics: Ads Conversion ID', 'google-site-kit' ), 534 534 'value' => $settings['adsConversionID'], 535 535 'debug' => Debug_Data::redact_debug_value( $settings['adsConversionID'] ), 536 536 ), 537 537 'analytics_4_available_custom_dimensions' => array( 538 'label' => __( 'Analytics available custom dimensions', 'google-site-kit' ),538 'label' => __( 'Analytics: Available Custom Dimensions', 'google-site-kit' ), 539 539 'value' => empty( $settings['availableCustomDimensions'] ) 540 540 ? __( 'None', 'google-site-kit' ) … … 549 549 ), 550 550 'analytics_4_ads_linked' => array( 551 'label' => __( 'Analytics Ads Linked', 'google-site-kit' ),551 'label' => __( 'Analytics: Ads Linked', 'google-site-kit' ), 552 552 'value' => $settings['adsLinked'] ? __( 'Connected', 'google-site-kit' ) : __( 'Not connected', 'google-site-kit' ), 553 553 'debug' => $settings['adsLinked'], 554 554 ), 555 555 'analytics_4_ads_linked_last_synced_at' => array( 556 'label' => __( 'Analytics Ads Linked Last Synced At', 'google-site-kit' ),556 'label' => __( 'Analytics: Ads Linked Last Synced At', 'google-site-kit' ), 557 557 'value' => $settings['adsLinkedLastSyncedAt'] ? gmdate( 'Y-m-d H:i:s', $settings['adsLinkedLastSyncedAt'] ) : __( 'Never synced', 'google-site-kit' ), 558 558 'debug' => $settings['adsLinkedLastSyncedAt'], … … 562 562 if ( $this->is_adsense_connected() ) { 563 563 $debug_fields['analytics_4_adsense_linked'] = array( 564 'label' => __( 'Analytics AdSense Linked', 'google-site-kit' ),564 'label' => __( 'Analytics: AdSense Linked', 'google-site-kit' ), 565 565 'value' => $settings['adSenseLinked'] ? __( 'Connected', 'google-site-kit' ) : __( 'Not connected', 'google-site-kit' ), 566 566 'debug' => Debug_Data::redact_debug_value( $settings['adSenseLinked'] ), … … 568 568 569 569 $debug_fields['analytics_4_adsense_linked_last_synced_at'] = array( 570 'label' => __( 'Analytics AdSense Linked Last Synced At', 'google-site-kit' ),570 'label' => __( 'Analytics: AdSense Linked Last Synced At', 'google-site-kit' ), 571 571 'value' => $settings['adSenseLinkedLastSyncedAt'] ? gmdate( 'Y-m-d H:i:s', $settings['adSenseLinkedLastSyncedAt'] ) : __( 'Never synced', 'google-site-kit' ), 572 572 'debug' => Debug_Data::redact_debug_value( $settings['adSenseLinkedLastSyncedAt'] ), … … 580 580 581 581 $debug_fields['analytics_4_site_kit_audiences'] = array( 582 'label' => __( 'Analytics site created audiences', 'google-site-kit' ),582 'label' => __( 'Analytics: Site created audiences', 'google-site-kit' ), 583 583 'value' => empty( $site_kit_audiences ) 584 584 ? __( 'None', 'google-site-kit' ) -
google-site-kit/tags/1.141.0/includes/Modules/Reader_Revenue_Manager.php
r3148853 r3201134 29 29 use Google\Site_Kit\Core\Modules\Module_With_Tag_Trait; 30 30 use Google\Site_Kit\Core\REST_API\Data_Request; 31 use Google\Site_Kit\Core\REST_API\Exception\Missing_Required_Param_Exception; 31 32 use Google\Site_Kit\Core\Site_Health\Debug_Data; 32 33 use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard; … … 34 35 use Google\Site_Kit\Core\Util\URL; 35 36 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings; 37 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState; 36 38 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard; 37 39 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers; … … 68 70 $this->register_scopes_hook(); 69 71 72 $synchronize_onboarding_state = new Synchronize_OnboardingState( 73 $this, 74 $this->user_options 75 ); 76 $synchronize_onboarding_state->register(); 77 78 add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) ); 79 add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) ); 80 70 81 // Reader Revenue Manager tag placement logic. 71 82 add_action( 'template_redirect', array( $this, 'register_tag' ) ); … … 192 203 protected function get_datapoint_definitions() { 193 204 return array( 194 'GET:publications' => array( 'service' => 'subscribewithgoogle' ), 205 'GET:publications' => array( 206 'service' => 'subscribewithgoogle', 207 ), 208 'POST:sync-publication-onboarding-state' => array( 209 'service' => 'subscribewithgoogle', 210 ), 195 211 ); 196 212 } … … 204 220 * @return RequestInterface|callable|WP_Error Request object or callable on success, or WP_Error on failure. 205 221 * 206 * @throws Invalid_Datapoint_Exception Thrown if the datapoint does not exist.222 * @throws Invalid_Datapoint_Exception|Missing_Required_Param_Exception Thrown if the datapoint does not exist or parameters are missing. 207 223 */ 208 224 protected function create_data_request( Data_Request $data ) { … … 216 232 $subscribewithgoogle = $this->get_service( 'subscribewithgoogle' ); 217 233 return $subscribewithgoogle->publications->listPublications( array( 'filter' => $this->get_publication_filter() ) ); 234 235 case 'POST:sync-publication-onboarding-state': 236 if ( empty( $data['publicationID'] ) ) { 237 throw new Missing_Required_Param_Exception( 'publicationID' ); 238 } 239 240 if ( empty( $data['publicationOnboardingState'] ) ) { 241 throw new Missing_Required_Param_Exception( 'publicationOnboardingState' ); 242 } 243 244 $publications = $this->get_data( 'publications' ); 245 246 if ( is_wp_error( $publications ) ) { 247 return $publications; 248 } 249 250 if ( empty( $publications ) ) { 251 return new WP_Error( 252 'publication_not_found', 253 __( 'Publication not found.', 'google-site-kit' ), 254 array( 'status' => 404 ) 255 ); 256 } 257 258 $publication = array_filter( 259 $publications, 260 function ( $publication ) use ( $data ) { 261 return $publication->getPublicationId() === $data['publicationID']; 262 } 263 ); 264 265 if ( empty( $publication ) ) { 266 return new WP_Error( 267 'publication_not_found', 268 __( 'Publication not found.', 'google-site-kit' ), 269 array( 'status' => 404 ) 270 ); 271 } 272 273 $publication = reset( $publication ); 274 $new_onboarding_state = $publication->getOnboardingState(); 275 276 if ( $new_onboarding_state === $data['publicationOnboardingState'] ) { 277 return function () { 278 return (object) array(); 279 }; 280 } 281 282 $settings = $this->get_settings(); 283 284 if ( $data['publicationID'] === $settings->get()['publicationID'] ) { 285 $settings->merge( 286 array( 287 'publicationOnboardingState' => $new_onboarding_state, 288 ) 289 ); 290 } 291 292 return function () use ( $data, $new_onboarding_state ) { 293 return (object) array( 294 'publicationID' => $data['publicationID'], 295 'publicationOnboardingState' => $new_onboarding_state, 296 ); 297 }; 218 298 } 219 299 … … 373 453 return array( 374 454 'reader_revenue_manager_publication_id' => array( 375 'label' => __( 'Reader Revenue Manager publication ID', 'google-site-kit' ),455 'label' => __( 'Reader Revenue Manager: Publication ID', 'google-site-kit' ), 376 456 'value' => $settings['publicationID'], 377 457 'debug' => Debug_Data::redact_debug_value( $settings['publicationID'] ), 378 458 ), 379 459 'reader_revenue_manager_publication_onboarding_state' => array( 380 'label' => __( 'Reader Revenue Manager publication onboarding state', 'google-site-kit' ),460 'label' => __( 'Reader Revenue Manager: Publication onboarding state', 'google-site-kit' ), 381 461 'value' => $settings['publicationOnboardingState'], 382 462 'debug' => $settings['publicationOnboardingState'], 383 463 ), 384 'reader_revenue_manager_publication_onboarding_state_last_synced_at' => array(385 'label' => __( 'Reader Revenue Manager publication onboarding state last synced at', 'google-site-kit' ),386 'value' => $settings['publicationOnboardingStateLastSyncedAtMs'] ? gmdate( 'Y-m-d H:i:s', $settings['publicationOnboardingStateLastSyncedAtMs'] / 1000 ) : __( 'Never synced', 'google-site-kit' ),387 'debug' => $settings['publicationOnboardingStateLastSyncedAtMs'],388 ),389 464 ); 390 465 } -
google-site-kit/tags/1.141.0/includes/Modules/Reader_Revenue_Manager/Settings.php
r3134468 r3201134 70 70 protected function get_default() { 71 71 return array( 72 'ownerID' => 0,73 'publicationID' => '',74 'publicationOnboardingState' => '',75 'publicationOnboardingState LastSyncedAtMs' => 0,72 'ownerID' => 0, 73 'publicationID' => '', 74 'publicationOnboardingState' => '', 75 'publicationOnboardingStateChanged' => false, 76 76 ); 77 77 } … … 103 103 } 104 104 105 if ( isset( $option['publicationOnboardingState LastSyncedAtMs'] ) ) {106 if ( ! is_ int( $option['publicationOnboardingStateLastSyncedAtMs'] ) ) {107 $option['publicationOnboardingState LastSyncedAtMs'] = 0;105 if ( isset( $option['publicationOnboardingStateChanged'] ) ) { 106 if ( ! is_bool( $option['publicationOnboardingStateChanged'] ) ) { 107 $option['publicationOnboardingStateChanged'] = false; 108 108 } 109 109 } -
google-site-kit/tags/1.141.0/includes/Modules/Search_Console.php
r3148853 r3201134 166 166 return array( 167 167 'search_console_property' => array( 168 'label' => __( 'Search Console property', 'google-site-kit' ),168 'label' => __( 'Search Console: Property', 'google-site-kit' ), 169 169 'value' => $this->get_property_id(), 170 170 ), -
google-site-kit/tags/1.141.0/includes/Modules/Sign_In_With_Google.php
r3191565 r3201134 11 11 namespace Google\Site_Kit\Modules; 12 12 13 use Google\Site_Kit\Core\Assets\Asset; 13 14 use Google\Site_Kit\Core\Assets\Script; 14 15 use Google\Site_Kit\Core\Conversion_Tracking\Conversion_Event_Providers\WooCommerce; … … 23 24 use Google\Site_Kit\Core\Modules\Module_With_Tag_Trait; 24 25 use Google\Site_Kit\Core\Modules\Tags\Module_Tag_Matchers; 26 use Google\Site_Kit\Core\Permissions\Permissions; 25 27 use Google\Site_Kit\Core\Site_Health\Debug_Data; 28 use Google\Site_Kit\Core\Storage\Options; 29 use Google\Site_Kit\Core\Storage\User_Options; 30 use Google\Site_Kit\Core\Util\BC_Functions; 26 31 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 32 use Google\Site_Kit\Modules\Sign_In_With_Google\Authenticator; 33 use Google\Site_Kit\Modules\Sign_In_With_Google\Authenticator_Interface; 34 use Google\Site_Kit\Modules\Sign_In_With_Google\Hashed_User_ID; 35 use Google\Site_Kit\Modules\Sign_In_With_Google\Profile_Reader; 27 36 use Google\Site_Kit\Modules\Sign_In_With_Google\Settings; 28 37 use Google\Site_Kit\Modules\Sign_In_With_Google\Tag_Matchers; 29 use Google\Site_Kit_Dependencies\Google_Client;30 38 use WP_Error; 39 use WP_User; 31 40 32 41 /** 33 * Class representing the Sign in With Google module.42 * Class representing the Sign in with Google module. 34 43 * 35 44 * @since 1.137.0 … … 50 59 51 60 /** 61 * Authentication action name. 62 */ 63 const ACTION_AUTH = 'googlesitekit_auth'; 64 65 /** 66 * Disconnect action name. 67 */ 68 const ACTION_DISCONNECT = 'googlesitekit_auth_disconnect'; 69 70 /** 52 71 * Registers functionality through WordPress hooks. 53 72 * 54 73 * @since 1.137.0 74 * @since 1.141.0 Add functionality to allow users to disconnect their own account and admins to disconnect any user. 55 75 */ 56 76 public function register() { 57 add_filter( 'wp_login_errors', array( $this, 'handle_google_auth_errors' ) ); 58 59 add_action( 'login_form_google_auth', array( $this, 'handle_google_auth' ) ); 77 add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) ); 78 79 add_action( 80 'login_form_' . self::ACTION_AUTH, 81 function () { 82 $settings = $this->get_settings(); 83 84 $profile_reader = new Profile_Reader( $settings ); 85 $authenticator = new Authenticator( $this->user_options, $profile_reader ); 86 87 $this->handle_auth_callback( $authenticator ); 88 } 89 ); 90 91 add_action( 'admin_action_' . self::ACTION_DISCONNECT, fn () => $this->handle_disconnect_user() ); 92 60 93 add_action( 'login_form', $this->get_method_proxy( 'render_signin_button' ) ); 61 } 62 63 /** 64 * Intercept the page request to process token ID 65 * and complete Sign in with Google flow. 66 * 67 * @since 1.140.0 68 */ 69 public function handle_google_auth() { 70 $request_method = $this->context->input()->filter( INPUT_SERVER, 'REQUEST_METHOD' ); 71 94 95 add_action( 'show_user_profile', $this->get_method_proxy( 'render_disconnect_profile' ) ); // This action shows the disconnect section on the users own profile page. 96 add_action( 'edit_user_profile', $this->get_method_proxy( 'render_disconnect_profile' ) ); // This action shows the disconnect section on other users profile page to allow admins to disconnect others. 97 98 add_action( 'woocommerce_login_form_start', $this->get_method_proxy( 'render_signin_button' ) ); 99 } 100 101 /** 102 * Handles the callback request after the user signs in with Google. 103 * 104 * @since 1.140.0 105 * 106 * @param Authenticator_Interface $authenticator Authenticator instance. 107 */ 108 private function handle_auth_callback( Authenticator_Interface $authenticator ) { 109 $input = $this->context->input(); 110 111 // Ignore the request if the request method is not POST. 112 $request_method = $input->filter( INPUT_SERVER, 'REQUEST_METHOD' ); 72 113 if ( 'POST' !== $request_method ) { 73 114 return; 74 115 } 75 116 76 $csrf_cookie = $this->context->input()->filter( INPUT_COOKIE, 'g_csrf_token' ); 77 $csrf_post = $this->context->input()->filter( INPUT_POST, 'g_csrf_token' ); 78 79 if ( 80 ! $csrf_cookie || 81 ! $csrf_post || 82 $csrf_cookie !== $csrf_post 83 ) { 84 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_g_csrf_token', wp_login_url() ) ); 85 exit; 86 } 87 88 $client_id = $this->get_settings()->get()['clientID']; 89 $id_token = $this->context->input()->filter( INPUT_POST, 'credential' ); 90 try { 91 $client = new Google_Client( array( 'client_id' => $client_id ) ); 92 $payload = $client->verifyIdToken( $id_token ); 93 94 if ( empty( $payload ) ) { 95 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_request', wp_login_url() ) ); 96 exit; 97 } 98 99 // @TODO implement further flow using $payload in #9339. 100 101 } catch ( \Exception $e ) { 102 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_request', wp_login_url() ) ); 117 $redirect_to = $authenticator->authenticate_user( $input ); 118 if ( ! empty( $redirect_to ) ) { 119 wp_safe_redirect( $redirect_to ); 103 120 exit; 104 121 } … … 113 130 * @return WP_Error $error WP_Error instance. 114 131 */ 115 public function handle_ google_auth_errors( $error ) {132 public function handle_login_errors( $error ) { 116 133 $error_code = $this->context->input()->filter( INPUT_GET, 'error' ); 117 134 if ( ! $error_code ) { … … 120 137 121 138 switch ( $error_code ) { 122 case 'google_auth_invalid_request': 123 case 'google_auth_invalid_g_csrf_token': 124 $error->add( 'google_auth', __( 'Sign in with Google failed.', 'google-site-kit' ) ); 139 case Authenticator::ERROR_INVALID_REQUEST: 140 $error->add( self::MODULE_SLUG, __( 'Sign in with Google failed.', 'google-site-kit' ) ); 141 break; 142 case Authenticator::ERROR_SIGNIN_FAILED: 143 $error->add( self::MODULE_SLUG, __( 'The user is not registered on this site.', 'google-site-kit' ) ); 125 144 break; 126 145 default: … … 206 225 public function is_connected() { 207 226 $options = $this->get_settings()->get(); 208 209 227 if ( empty( $options['clientID'] ) ) { 210 228 return false; … … 220 238 */ 221 239 private function render_signin_button() { 240 global $wp; 241 $is_woo_commerce_login = 'my-account' === $wp->request; 242 222 243 $settings = $this->get_settings()->get(); 223 244 if ( ! $settings['clientID'] ) { … … 225 246 } 226 247 227 $ redirect_url = add_query_arg( 'action', 'google_auth', wp_login_url() );228 if ( substr( $ redirect_url, 0, 5 ) !== 'https' ) {248 $login_uri = add_query_arg( 'action', self::ACTION_AUTH, wp_login_url() ); 249 if ( substr( $login_uri, 0, 5 ) !== 'https' ) { 229 250 return; 230 251 } 231 252 253 $redirect_to = $this->context->input()->filter( INPUT_GET, 'redirect_to' ); 254 if ( ! empty( $redirect_to ) ) { 255 $redirect_to = trim( $redirect_to ); 256 } 257 258 $btn_args = array( 259 'theme' => $settings['theme'], 260 'text' => $settings['text'], 261 'shape' => $settings['shape'], 262 ); 263 232 264 // Render the Sign in with Google button and related inline styles. 265 printf( "\n<!-- %s -->\n", esc_html__( 'Sign in with Google button added by Site Kit', 'google-site-kit' ) ); 266 BC_Functions::wp_print_script_tag( array( 'src' => 'https://accounts.google.com/gsi/client' ) ); 267 ob_start(); 233 268 ?> 234 <!-- <?php echo esc_html__( 'Sign in with Google button added by Site Kit', 'google-site-kit' ); ?> -->235 <?php /* phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript */ ?>236 <script src="https://accounts.google.com/gsi/client"></script>237 <script>238 269 ( () => { 239 google.accounts.id.initialize({ 270 const parent = document.createElement( 'div' ); 271 <?php if ( $is_woo_commerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 272 document.getElementsByClassName( 'login' )[0]?.insertBefore( parent, document.getElementsByClassName( 'woocommerce-form-row' )[0] ); 273 <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 274 document.getElementById( 'login' ).insertBefore( parent, document.getElementById( 'loginform' ) ); 275 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 276 277 async function handleCredentialResponse( response ) { 278 try { 279 const res = await fetch( '<?php echo esc_js( $login_uri ); ?>', { 280 method: 'POST', 281 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 282 body: new URLSearchParams( response ) 283 }); 284 if ( res.ok && res.redirected ) { 285 location.assign( res.url ); 286 } 287 } catch( error ) { 288 console.error( error ); 289 } 290 } 291 292 google.accounts.id.initialize( { 240 293 client_id: '<?php echo esc_js( $settings['clientID'] ); ?>', 241 login_uri: '<?php echo esc_js( $redirect_url ); ?>', 242 ux_mode: 'redirect', 243 }); 244 const parent = document.createElement( 'div' ); 245 document.getElementById( 'login').insertBefore( parent, document.getElementById( 'loginform' ) ); 246 google.accounts.id.renderButton(parent, { 247 theme: '<?php echo esc_js( $settings['theme'] ); ?>', 248 text: '<?php echo esc_js( $settings['text'] ); ?>', 249 shape: '<?php echo esc_js( $settings['shape'] ); ?>' 250 }); 294 callback: handleCredentialResponse, 295 } ); 296 297 google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> ); 298 299 <?php if ( $settings['oneTapEnabled'] ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 300 google.accounts.id.prompt(); 301 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 302 303 <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 304 const expires = new Date(); 305 expires.setTime( expires.getTime() + 1000 * 60 * 5 ); 306 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() ); ?>"; 307 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 251 308 } )(); 252 </script>253 <!-- <?php echo esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ); ?> -->254 309 <?php 310 BC_Functions::wp_print_inline_script_tag( ob_get_clean() ); 311 printf( "\n<!-- %s -->\n", esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ) ); 255 312 } 256 313 … … 260 317 * @since 1.140.0 261 318 * 262 * @return array319 * @return int 263 320 */ 264 321 public function get_authenticated_users_count() { 265 322 global $wpdb; 266 323 267 $settings = $this->get_settings();268 324 // phpcs:ignore WordPress.DB.DirectDatabaseQuery 269 return $wpdb->query( 270 $wpdb->prepare( "SELECT count(id) FROM $wpdb->usermeta WHERE meta_key = %s", self::GOOGLE_USER_ID_OPTION ) 325 return (int) $wpdb->get_var( 326 $wpdb->prepare( 327 "SELECT COUNT( user_id ) FROM $wpdb->usermeta WHERE meta_key = %s", 328 $this->user_options->get_meta_key( Hashed_User_ID::OPTION ) 329 ) 271 330 ); 272 331 } … … 282 341 $settings = $this->get_settings()->get(); 283 342 284 // TODO Uncomment and remove fixed value after #9339 is merged. 285 // $authenticated_user_count = $this->get_authenticated_users_count();. 286 $authenticated_user_count = 1; 343 $authenticated_user_count = $this->get_authenticated_users_count(); 287 344 288 345 $debug_fields = array( 289 346 'sign_in_with_google_client_id' => array( 290 'label' => __( 'Sign in with Google Client ID', 'google-site-kit' ),347 'label' => __( 'Sign in with Google: Client ID', 'google-site-kit' ), 291 348 'value' => $settings['clientID'], 292 349 'debug' => Debug_Data::redact_debug_value( $settings['clientID'] ), 293 350 ), 294 351 'sign_in_with_google_shape' => array( 295 'label' => __( 'Sign in with Google Shape', 'google-site-kit' ),352 'label' => __( 'Sign in with Google: Shape', 'google-site-kit' ), 296 353 'value' => $this->get_settings()->get_label( 'shape', $settings['shape'] ), 297 354 'debug' => $settings['shape'], 298 355 ), 299 356 'sign_in_with_google_text' => array( 300 'label' => __( 'Sign in with Google Text', 'google-site-kit' ),357 'label' => __( 'Sign in with Google: Text', 'google-site-kit' ), 301 358 'value' => $this->get_settings()->get_label( 'text', $settings['text'] ), 302 359 'debug' => $settings['text'], 303 360 ), 304 361 'sign_in_with_google_theme' => array( 305 'label' => __( 'Sign in with Google Theme', 'google-site-kit' ),362 'label' => __( 'Sign in with Google: Theme', 'google-site-kit' ), 306 363 'value' => $this->get_settings()->get_label( 'theme', $settings['theme'] ), 307 364 'debug' => $settings['theme'], 308 365 ), 309 366 'sign_in_with_google_use_snippet' => array( 310 'label' => __( 'Sign in with Google One-tap Enabled', 'google-site-kit' ),367 'label' => __( 'Sign in with Google: One-tap Enabled', 'google-site-kit' ), 311 368 'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 312 369 'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no', 313 370 ), 314 371 'sign_in_with_google_authenticated_user_count' => array( 315 'label' => __( 'Sign in with Google Number of users who have authenticated using Sign in with Google', 'google-site-kit' ),372 'label' => __( 'Sign in with Google: Number of users who have authenticated using Sign in with Google', 'google-site-kit' ), 316 373 'value' => $authenticated_user_count, 317 374 'debug' => $authenticated_user_count, … … 394 451 return Module_Tag_Matchers::NO_TAG_FOUND; 395 452 } 453 454 /** 455 * Returns the disconnect URL for the specified user. 456 * 457 * @since 1.141.0 458 * 459 * @param int $user_id WordPress User ID. 460 */ 461 public static function disconnect_url( $user_id ) { 462 return add_query_arg( 463 array( 464 'action' => self::ACTION_DISCONNECT, 465 'nonce' => wp_create_nonce( self::ACTION_DISCONNECT . '-' . $user_id ), 466 'user_id' => $user_id, 467 ), 468 admin_url( 'index.php' ) 469 ); 470 } 471 472 /** 473 * Handles the disconnect action. 474 * 475 * @since 1.141.0 476 */ 477 public function handle_disconnect_user() { 478 $input = $this->context->input(); 479 $nonce = $input->filter( INPUT_GET, 'nonce' ); 480 $user_id = (int) $input->filter( INPUT_GET, 'user_id' ); 481 $action = self::ACTION_DISCONNECT . '-' . $user_id; 482 483 if ( ! wp_verify_nonce( $nonce, $action ) ) { 484 $this->authentication->invalid_nonce_error( $action ); 485 } 486 487 // Only allow this action for admins or users own setting. 488 if ( current_user_can( 'edit_user', $user_id ) ) { 489 $hashed_user_id = new Hashed_User_ID( new User_Options( $this->context, $user_id ) ); 490 $hashed_user_id->delete(); 491 wp_safe_redirect( add_query_arg( 'updated', true, get_edit_user_link( $user_id ) ) ); 492 exit; 493 } 494 495 wp_safe_redirect( get_edit_user_link( $user_id ) ); 496 exit; 497 } 498 499 /** 500 * Displays a disconnect button on user profile pages. 501 * 502 * @since 1.141.0 503 * 504 * @param WP_User $user WordPress user object. 505 */ 506 private function render_disconnect_profile( WP_User $user ) { 507 if ( ! current_user_can( 'edit_user', $user->ID ) ) { 508 return; 509 } 510 511 $hashed_user_id = new Hashed_User_ID( new User_Options( $this->context, $user->ID ) ); 512 $current_user_google_id = $hashed_user_id->get(); 513 514 // Don't show if the user does not have a Google ID saved in user meta. 515 if ( empty( $current_user_google_id ) ) { 516 return; 517 } 518 519 ?> 520 <div id="googlesitekit-sign-in-with-google-disconnect"> 521 <h2><?php esc_html_e( 'Sign in with Google via Site Kit by Google', 'google-site-kit' ); ?></h2> 522 <p> 523 <?php 524 if ( get_current_user_id() === $user->ID ) { 525 esc_html_e( 526 'You can sign in with your Google account.', 527 'google-site-kit' 528 ); 529 } else { 530 esc_html_e( 531 'This user can sign in with their Google account.', 532 'google-site-kit' 533 ); 534 } 535 ?> 536 </p> 537 <p> 538 <a 539 class="button button-secondary" 540 href="<?php echo esc_url( self::disconnect_url( $user->ID ) ); ?>" 541 > 542 <?php esc_html_e( 'Disconnect Google Account', 'google-site-kit' ); ?> 543 </a> 544 </p> 545 </div> 546 <?php 547 } 396 548 } -
google-site-kit/tags/1.141.0/includes/Modules/Tag_Manager.php
r3118692 r3201134 174 174 return array( 175 175 'tagmanager_account_id' => array( 176 'label' => __( 'Tag Manager account ID', 'google-site-kit' ),176 'label' => __( 'Tag Manager: Account ID', 'google-site-kit' ), 177 177 'value' => $settings['accountID'], 178 178 'debug' => Debug_Data::redact_debug_value( $settings['accountID'] ), 179 179 ), 180 180 'tagmanager_container_id' => array( 181 'label' => __( 'Tag Manager container ID', 'google-site-kit' ),181 'label' => __( 'Tag Manager: Container ID', 'google-site-kit' ), 182 182 'value' => $settings['containerID'], 183 183 'debug' => Debug_Data::redact_debug_value( $settings['containerID'], 7 ), 184 184 ), 185 185 'tagmanager_amp_container_id' => array( 186 'label' => __( 'Tag Manager AMP container ID', 'google-site-kit' ),186 'label' => __( 'Tag Manager: AMP Container ID', 'google-site-kit' ), 187 187 'value' => $settings['ampContainerID'], 188 188 'debug' => Debug_Data::redact_debug_value( $settings['ampContainerID'], 7 ), 189 189 ), 190 190 'tagmanager_use_snippet' => array( 191 'label' => __( 'Tag Manager snippet placed', 'google-site-kit' ),191 'label' => __( 'Tag Manager: Snippet placed', 'google-site-kit' ), 192 192 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 193 193 'debug' => $settings['useSnippet'] ? 'yes' : 'no', -
google-site-kit/tags/1.141.0/includes/Plugin.php
r3164469 r3201134 227 227 ( new Core\Tags\GTag() )->register(); 228 228 ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register(); 229 if ( Feature_Flags::enabled( 'firstPartyMode' ) ) { 230 ( new Core\Tags\First_Party_Mode\First_Party_Mode( $this->context, $options ) )->register(); 231 } 229 232 230 233 // If a login is happening (runs after 'init'), update current user in dependency chain. -
google-site-kit/tags/1.141.0/includes/vendor/composer/autoload_classmap.php
r3191565 r3201134 177 177 'Google\\Site_Kit\\Core\\Storage\\User_Transients' => $baseDir . '/Core/Storage/User_Transients.php', 178 178 'Google\\Site_Kit\\Core\\Tags\\Blockable_Tag_Interface' => $baseDir . '/Core/Tags/Blockable_Tag_Interface.php', 179 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\First_Party_Mode' => $baseDir . '/Core/Tags/First_Party_Mode/First_Party_Mode.php', 180 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\First_Party_Mode_Settings' => $baseDir . '/Core/Tags/First_Party_Mode/First_Party_Mode_Settings.php', 181 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\REST_First_Party_Mode_Controller' => $baseDir . '/Core/Tags/First_Party_Mode/REST_First_Party_Mode_Controller.php', 179 182 'Google\\Site_Kit\\Core\\Tags\\GTag' => $baseDir . '/Core/Tags/GTag.php', 180 183 'Google\\Site_Kit\\Core\\Tags\\Guards\\Tag_Environment_Type_Guard' => $baseDir . '/Core/Tags/Guards/Tag_Environment_Type_Guard.php', … … 301 304 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager' => $baseDir . '/Modules/Reader_Revenue_Manager.php', 302 305 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php', 306 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php', 303 307 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php', 304 308 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php', … … 307 311 'Google\\Site_Kit\\Modules\\Search_Console\\Settings' => $baseDir . '/Modules/Search_Console/Settings.php', 308 312 'Google\\Site_Kit\\Modules\\Sign_In_With_Google' => $baseDir . '/Modules/Sign_In_With_Google.php', 313 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Authenticator' => $baseDir . '/Modules/Sign_In_With_Google/Authenticator.php', 314 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Authenticator_Interface' => $baseDir . '/Modules/Sign_In_With_Google/Authenticator_Interface.php', 315 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Hashed_User_ID' => $baseDir . '/Modules/Sign_In_With_Google/Hashed_User_ID.php', 316 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Profile_Reader' => $baseDir . '/Modules/Sign_In_With_Google/Profile_Reader.php', 317 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Profile_Reader_Interface' => $baseDir . '/Modules/Sign_In_With_Google/Profile_Reader_Interface.php', 309 318 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Settings' => $baseDir . '/Modules/Sign_In_With_Google/Settings.php', 310 319 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Tag_Matchers' => $baseDir . '/Modules/Sign_In_With_Google/Tag_Matchers.php', -
google-site-kit/tags/1.141.0/readme.txt
r3191565 r3201134 5 5 Tested up to: 6.7 6 6 Requires PHP: 7.4 7 Stable tag: 1.14 0.07 Stable tag: 1.141.0 8 8 License: Apache License 2.0 9 9 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 110 110 == Changelog == 111 111 112 = 1.14 0.0 =112 = 1.141.0 = 113 113 114 114 **Added** 115 115 116 * Add Sign in with Google to Site Health. See [#9571](https://github.com/google/site-kit-wp/issues/9571). 117 * Add new feature notification for Sign in with Google module. See [#9335](https://github.com/google/site-kit-wp/issues/9335). 116 * Add Sign in with Google to WooCommerce login page. See [#9340](https://github.com/google/site-kit-wp/issues/9340). 118 117 119 118 **Enhanced** 120 119 121 * Add a survey to be triggered when audience groups are set up. See [#9656](https://github.com/google/site-kit-wp/issues/9656). 122 * Update styles for the admin settings. See [#9580](https://github.com/google/site-kit-wp/issues/9580). 123 * Add GA event tracking for user interactions with the Audience Segmentation Setup in the Settings section. See [#9499](https://github.com/google/site-kit-wp/issues/9499). 124 * Add opt-in event tracking for the Audience Segmentation introductory popup/banner. See [#9498](https://github.com/google/site-kit-wp/issues/9498). 125 * Add GA event tracking for user interactions with the Audience Selection Panel. See [#9497](https://github.com/google/site-kit-wp/issues/9497). 126 * Add opt-in user activity tracking in the audience tiles area. See [#9494](https://github.com/google/site-kit-wp/issues/9494). 127 * Add opt-in user activity tracking in the audience setup CTA widget and related setting areas. See [#9493](https://github.com/google/site-kit-wp/issues/9493). 128 * Don't unnecessarily render the Key Metrics Selection Panel into the DOM. See [#9468](https://github.com/google/site-kit-wp/issues/9468). 129 * Add a stub survey trigger that is called when viewing the Reader Revenue Manager Setup CTA. See [#9447](https://github.com/google/site-kit-wp/issues/9447). 130 * Update the widget area renderer to accept React components for subtitles. See [#9444](https://github.com/google/site-kit-wp/issues/9444). 131 * Add modal of tailored metrics to User Input Questionnaire. See [#9439](https://github.com/google/site-kit-wp/issues/9439). 132 * Add confirmation modal for users changing key metrics. See [#9438](https://github.com/google/site-kit-wp/issues/9438). 133 * Add support for lost events to Conversion Reporting events datastore. See [#9379](https://github.com/google/site-kit-wp/issues/9379). 134 * Add a new "Chip Tab Group" component. See [#9378](https://github.com/google/site-kit-wp/issues/9378). 135 * Add new notification to Key Metrics Widget Settings Area. See [#9344](https://github.com/google/site-kit-wp/issues/9344). 136 * Implement the Sign in with Google callback action. See [#9338](https://github.com/google/site-kit-wp/issues/9338). 137 * Fix a bug that prevented the appearance of the Reader Revenue Manager setup banner graphic. See [#9329](https://github.com/google/site-kit-wp/issues/9329). 138 * Include a "Learn more" link on the Reader Revenue Manager setup screen shown when the user doesn't have an existing publication. See [#9259](https://github.com/google/site-kit-wp/issues/9259). 120 * Update Sign in with Google descriptions in Site Health. See [#9680](https://github.com/google/site-kit-wp/issues/9680). 121 * Update the Sign in with Google login to use the popup approach. See [#9677](https://github.com/google/site-kit-wp/issues/9677). 122 * Integrate the First-party mode proxy script that will allow Analytics events to be tracked via requests made from the browser to the user's site rather than directly to Google's servers. See [#9665](https://github.com/google/site-kit-wp/issues/9665). 123 * Add info to the "One-tap" option in Sign in with Google settings. See [#9643](https://github.com/google/site-kit-wp/issues/9643). 124 * Do not show "Maybe later" in Key Metrics Admin Settings callout banner. See [#9636](https://github.com/google/site-kit-wp/issues/9636). 125 * Implement the `fetchGetFPMServerRequirementStatus()` Redux action used to retrieve the FPM server requirement status. See [#9634](https://github.com/google/site-kit-wp/issues/9634). 126 * Add an `fpm-server-requirement-status` API endpoint to verify First-Party Mode readiness by performing FPFE health checks and verifying direct PHP script access. See [#9632](https://github.com/google/site-kit-wp/issues/9632). 127 * Add a partial datastore for First-Party Mode in the `core/site` datastore to manage its settings. See [#9628](https://github.com/google/site-kit-wp/issues/9628). 128 * Add REST endpoints for First-Party Mode module settings. See [#9625](https://github.com/google/site-kit-wp/issues/9625). 129 * Update "Get your Client ID" link in Sign in with Google setup. See [#9621](https://github.com/google/site-kit-wp/issues/9621). 130 * Ensure tailored metrics override previous metrics when switching from manually-selected metrics. See [#9613](https://github.com/google/site-kit-wp/issues/9613). 131 * Improve the accuracy of the mechanism that scrolls the user to a widget area. See [#9603](https://github.com/google/site-kit-wp/issues/9603). 132 * Improve visitor groups selection panel to prevent a console warning. See [#9602](https://github.com/google/site-kit-wp/issues/9602). 133 * Add an external icon to external links in the audience selection panel and placeholder tile. See [#9598](https://github.com/google/site-kit-wp/issues/9598). 134 * Remove visitor groups setup success notifications when the user chooses not to display visitor groups in dashboard. See [#9596](https://github.com/google/site-kit-wp/issues/9596). 135 * Introduce grouping of notification queues. See [#9568](https://github.com/google/site-kit-wp/issues/9568). 136 * Add notice for users who used a legacy answer in Key Metrics settings. See [#9518](https://github.com/google/site-kit-wp/issues/9518). 137 * Split the "Sell products or services" answer in the User Input app. See [#9489](https://github.com/google/site-kit-wp/issues/9489). 138 * Persist selection group in Key Metrics selection panel. See [#9385](https://github.com/google/site-kit-wp/issues/9385). 139 * Add support for disconnecting associated Google account for sign in from WordPress user edit screen. See [#9380](https://github.com/google/site-kit-wp/issues/9380). 140 * Implement new subtle notification banner in KMW dashboard area. See [#9371](https://github.com/google/site-kit-wp/issues/9371). 141 * Move on-demand onboarding state synchronization to the server side, avoiding the need to reload the full list of publications. See [#9363](https://github.com/google/site-kit-wp/issues/9363). 142 * Improve selection panels so that they perform actions only when in view. See [#9312](https://github.com/google/site-kit-wp/issues/9312). 143 * Improve Reader Revenue Manager publication onboarding state synchronization. See [#9149](https://github.com/google/site-kit-wp/issues/9149). 144 * Add Key Metrics info to Site Health report. See [#9112](https://github.com/google/site-kit-wp/issues/9112). 145 146 **Changed** 147 148 * Implement settings view for Sign in with Google. See [#9477](https://github.com/google/site-kit-wp/issues/9477). 149 * Implement Sign in with Google token response login handling. See [#9339](https://github.com/google/site-kit-wp/issues/9339). 139 150 140 151 **Fixed** 141 152 142 * Only place the Reader Revenue Manager snippet on singular WordPress posts. See [#9670](https://github.com/google/site-kit-wp/issues/9670). 143 * Fix typo in Key Metrics Widget. See [#9614](https://github.com/google/site-kit-wp/issues/9614). 144 * Fix the issue where an extra "Failed to enable metric" modal appears when canceled in the Audience Segmentation "Top Content" custom dimension creation flow. See [#9563](https://github.com/google/site-kit-wp/issues/9563). 145 * Fix dashboard error when selecting specific key metrics on the view-only dashboard. See [#9548](https://github.com/google/site-kit-wp/issues/9548). 146 * Remove the “Temporarily hidden” badge when temporarily hidden tiles reappear with only a single tile visible. See [#9472](https://github.com/google/site-kit-wp/issues/9472). 147 * Ensure "Add a metric" tiles are always visible on the view-only dashboard when fewer than 4 metrics are available or fewer than 8 metrics if the `conversionReporting` feature flag is enabled. See [#8712](https://github.com/google/site-kit-wp/issues/8712). 153 * Fix a bug that caused a custom dimension to not be created while setting up visitor groups. See [#9597](https://github.com/google/site-kit-wp/issues/9597). 148 154 149 155 [See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt). -
google-site-kit/trunk/dist/manifest.php
r3191565 r3201134 19 19 'analytics-advanced-tracking' => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ), 20 20 'googlesitekit-i18n' => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ), 21 'googlesitekit-admin-css' => array( "googlesitekit-admin-css- 436096755512e44a2180.min.css", null ),21 'googlesitekit-admin-css' => array( "googlesitekit-admin-css-c7c4e28ef467fa74720d.min.css", null ), 22 22 'googlesitekit-adminbar-css' => array( "googlesitekit-adminbar-css-6db776544b37175be17f.min.css", null ), 23 23 'googlesitekit-authorize-application-css' => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ), 24 24 'googlesitekit-wp-dashboard-css' => array( "googlesitekit-wp-dashboard-css-c5417a27cb905717f9fc.min.css", null ), 25 'googlesitekit-vendor' => array( "googlesitekit-vendor- a19e0d3a9785a4679814.js", null ),26 'googlesitekit-runtime' => array( "runtime- ac7cb3123d0c92a4c83a.js", null ),27 'googlesitekit-activation' => array( "googlesitekit-activation- 86e820f351b221f65654.js", null ),28 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery- 35406f6b97f89119cba2.js", null ),29 'googlesitekit-adminbar' => array( "googlesitekit-adminbar- 2aa4217dc92c2c92519c.js", null ),30 'googlesitekit-api' => array( "googlesitekit-api- 63e0255bae8c37401ba1.js", null ),31 'googlesitekit-components' => array( array( "googlesitekit-components-gm2- 888e11c2f889b3818fac.js", null ), array( "googlesitekit-components-gm3-6f888313ed0d8623cf0e.js", null ) ),32 'googlesitekit-data' => array( "googlesitekit-data- 9b04ce04845587d08ef9.js", null ),33 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms- f38e139a09c823fd80b9.js", null ),34 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location- 1e7b4e4c0f10376ae735.js", null ),35 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site- b48fcdc028f30543c49a.js", null ),36 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui- fbeb338baf423fe10a9a.js", null ),37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user- 8525155abe6c24a6b6e4.js", null ),38 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard- c2c8cb7c5a812c7ef92b.js", null ),39 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard- 4a22bdd52eac618bdba0.js", null ),40 'googlesitekit-modules' => array( "googlesitekit-modules- f137613a7b6e587d2f09.js", null ),41 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-8 294c3788d693c1aa4d1.js", null ),42 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense- 86be7f15c8ab18f2c8c2.js", null ),43 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-f b3e6466670e9fe98540.js", null ),44 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights- c88ecf4fb9fabd4b00ce.js", null ),45 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager- 0aca4740f1f170a04318.js", null ),46 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console- 338c440d2a515b691bf2.js", null ),47 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-5 6b980cf11ec18bc46e7.js", null ),48 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager- a9c1650ad917dc777a4f.js", null ),49 'googlesitekit-notifications' => array( "googlesitekit-notifications- e491c3e66473a45eb37c.js", null ),50 'googlesitekit-polyfills' => array( "googlesitekit-polyfills- b3b20bb6f4276a648085.js", null ),51 'googlesitekit-settings' => array( "googlesitekit-settings- 516d574e9df74fe6b81f.js", null ),52 'googlesitekit-splash' => array( "googlesitekit-splash- 30e76c65a9e86b793d44.js", null ),53 'googlesitekit-user-input' => array( "googlesitekit-user-input- ebc5e165960a36731c7f.js", null ),54 'googlesitekit-widgets' => array( "googlesitekit-widgets- c2422864a9b59a9a6def.js", null ),55 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard- a24f18cd5f1c8dae446d.js", null ),25 'googlesitekit-vendor' => array( "googlesitekit-vendor-56e09129c0c5da07a38b.js", null ), 26 'googlesitekit-runtime' => array( "runtime-28f15eb6ca67d1a2d920.js", null ), 27 'googlesitekit-activation' => array( "googlesitekit-activation-f250ffdb179ce67acd13.js", null ), 28 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery-f6e2202aedc4b9dec80a.js", null ), 29 'googlesitekit-adminbar' => array( "googlesitekit-adminbar-309ccca4cdd85f61e57c.js", null ), 30 'googlesitekit-api' => array( "googlesitekit-api-51477bf3a499de73c6b0.js", null ), 31 'googlesitekit-components' => array( array( "googlesitekit-components-gm2-d1deb8243b7fe27ddfd3.js", null ), array( "googlesitekit-components-gm3-26d6f652a561407fc1d9.js", null ) ), 32 'googlesitekit-data' => array( "googlesitekit-data-e2d57f0d3e8cbcde4f77.js", null ), 33 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms-d673eb18908574ac23e4.js", null ), 34 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location-b2b133386452785f40cd.js", null ), 35 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site-d81c0033927d3f14fb1a.js", null ), 36 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui-bca078eceaaa8c87948d.js", null ), 37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user-c9aee053073946d82bc6.js", null ), 38 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard-909580c1ad26533618a7.js", null ), 39 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard-00725d6f8918d582c7be.js", null ), 40 'googlesitekit-modules' => array( "googlesitekit-modules-eeec4132d38e98b7da80.js", null ), 41 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-8fc1dc559868da9f2c36.js", null ), 42 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense-e7fb25a5bd63d8fcdd08.js", null ), 43 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-f382f0563523da5f8023.js", null ), 44 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights-ac9df42867d70783b841.js", null ), 45 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager-fbbb8a6b54f8e8e6c506.js", null ), 46 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console-7ef9910074ab8c22bab3.js", null ), 47 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-5438d79c1a357d5f1552.js", null ), 48 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager-7c01bc6dc43a4de58a7e.js", null ), 49 'googlesitekit-notifications' => array( "googlesitekit-notifications-990bda6838a2b33db477.js", null ), 50 'googlesitekit-polyfills' => array( "googlesitekit-polyfills-2ca995545dced5490968.js", null ), 51 'googlesitekit-settings' => array( "googlesitekit-settings-3d397e7aeec169a6f6f7.js", null ), 52 'googlesitekit-splash' => array( "googlesitekit-splash-77f274ec773bb062bf6b.js", null ), 53 'googlesitekit-user-input' => array( "googlesitekit-user-input-f2a4eab971b7ec745147.js", null ), 54 'googlesitekit-widgets' => array( "googlesitekit-widgets-870e0a6fad71d1353b97.js", null ), 55 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard-d26ef36f87825368c95d.js", null ), 56 56 ); -
google-site-kit/trunk/google-site-kit.php
r3191565 r3201134 12 12 * Plugin URI: https://sitekit.withgoogle.com 13 13 * 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.14 0.014 * Version: 1.141.0 15 15 * Requires at least: 5.2 16 16 * Requires PHP: 7.4 … … 27 27 28 28 // Define most essential constants. 29 define( 'GOOGLESITEKIT_VERSION', '1.14 0.0' );29 define( 'GOOGLESITEKIT_VERSION', '1.141.0' ); 30 30 define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ ); 31 31 define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' ); -
google-site-kit/trunk/includes/Core/Assets/Assets.php
r3148853 r3201134 731 731 732 732 $inline_data = array( 733 'homeURL' => trailingslashit( $this->context->get_canonical_home_url() ), 734 'referenceSiteURL' => esc_url_raw( trailingslashit( $site_url ) ), 735 'adminURL' => esc_url_raw( trailingslashit( admin_url() ) ), 736 'assetsURL' => esc_url_raw( $this->context->url( 'dist/assets/' ) ), 737 'widgetsAdminURL' => esc_url_raw( $this->get_widgets_admin_url() ), 738 'blogPrefix' => $wpdb->get_blog_prefix(), 739 'ampMode' => $this->context->get_amp_mode(), 740 'isNetworkMode' => $this->context->is_network_mode(), 741 'timezone' => get_option( 'timezone_string' ), 742 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), 743 'enabledFeatures' => Feature_Flags::get_enabled_features(), 744 'webStoriesActive' => defined( 'WEBSTORIES_VERSION' ), 745 'postTypes' => $this->get_post_types(), 746 'storagePrefix' => $this->get_storage_prefix(), 747 'referenceDate' => apply_filters( 'googlesitekit_reference_date', null ), 748 'productPostType' => $this->get_product_post_type(), 733 'homeURL' => trailingslashit( $this->context->get_canonical_home_url() ), 734 'referenceSiteURL' => esc_url_raw( trailingslashit( $site_url ) ), 735 'adminURL' => esc_url_raw( trailingslashit( admin_url() ) ), 736 'assetsURL' => esc_url_raw( $this->context->url( 'dist/assets/' ) ), 737 'widgetsAdminURL' => esc_url_raw( $this->get_widgets_admin_url() ), 738 'blogPrefix' => $wpdb->get_blog_prefix(), 739 'ampMode' => $this->context->get_amp_mode(), 740 'isNetworkMode' => $this->context->is_network_mode(), 741 'timezone' => get_option( 'timezone_string' ), 742 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), 743 'enabledFeatures' => Feature_Flags::get_enabled_features(), 744 'webStoriesActive' => defined( 'WEBSTORIES_VERSION' ), 745 'postTypes' => $this->get_post_types(), 746 'storagePrefix' => $this->get_storage_prefix(), 747 'referenceDate' => apply_filters( 'googlesitekit_reference_date', null ), 748 'productPostType' => $this->get_product_post_type(), 749 'anyoneCanRegister' => (bool) get_option( 'users_can_register' ), 749 750 ); 750 751 -
google-site-kit/trunk/includes/Core/Consent_Mode/Consent_Mode.php
r3127664 r3201134 14 14 use Google\Site_Kit\Core\Assets\Script; 15 15 use Google\Site_Kit\Core\Storage\Options; 16 use Google\Site_Kit\Core\Util\BC_Functions; 16 17 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 17 18 use Plugin_Upgrader; … … 232 233 // The core Consent Mode code is in assets/js/consent-mode/consent-mode.js. 233 234 // Only code that passes data from PHP to JS should be in this file. 234 ?> 235 <!-- <?php echo esc_html__( 'Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ); ?> --> 236 <script id='google_gtagjs-js-consent-mode-data-layer'> 237 window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);} 238 gtag('consent', 'default', <?php echo wp_json_encode( $consent_defaults ); ?>); 239 window._googlesitekitConsentCategoryMap = <?php echo wp_json_encode( $consent_category_map ); ?>; 240 window._googlesitekitConsents = <?php echo wp_json_encode( $consent_defaults ); ?> 241 </script> 242 <!-- <?php echo esc_html__( 'End Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ); ?> --> 243 <?php 235 printf( "<!-- %s -->\n", esc_html__( 'Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ) ); 236 BC_Functions::wp_print_inline_script_tag( 237 join( 238 "\n", 239 array( 240 'window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}', 241 sprintf( "gtag('consent', 'default', %s);", wp_json_encode( $consent_defaults ) ), 242 sprintf( 'window._googlesitekitConsentCategoryMap = %s;', wp_json_encode( $consent_category_map ) ), 243 sprintf( 'window._googlesitekitConsents = %s;', wp_json_encode( $consent_defaults ) ), 244 ) 245 ), 246 array( 'id' => 'google_gtagjs-js-consent-mode-data-layer' ) 247 ); 248 printf( "<!-- %s -->\n", esc_html__( 'End Google tag (gtag.js) Consent Mode dataLayer added by Site Kit', 'google-site-kit' ) ); 244 249 } 245 250 -
google-site-kit/trunk/includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php
r3173125 r3201134 185 185 ) 186 186 ), 187 new REST_Route( 188 'core/user/data/reset-key-metrics-selection', 189 array( 190 'methods' => WP_REST_Server::CREATABLE, 191 'callback' => function () { 192 $this->settings->merge( array( 'widgetSlugs' => array() ) ); 193 194 return new WP_REST_Response( $this->settings->get() ); 195 }, 196 'permission_callback' => $has_capabilities, 197 ) 198 ), 187 199 ); 188 200 } -
google-site-kit/trunk/includes/Core/Site_Health/Debug_Data.php
r3156474 r3201134 15 15 use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client; 16 16 use Google\Site_Kit\Core\Conversion_Tracking\Conversion_Tracking; 17 use Google\Site_Kit\Core\Key_Metrics\Key_Metrics_Settings; 18 use Google\Site_Kit\Core\Key_Metrics\Key_Metrics_Setup_Completed_By; 17 19 use Google\Site_Kit\Core\Modules\Module; 18 20 use Google\Site_Kit\Core\Modules\Module_With_Debug_Fields; … … 196 198 $fields = array_merge( $fields, $this->get_consent_mode_fields() ); 197 199 $fields = array_merge( $fields, $this->get_module_sharing_settings_fields() ); 200 $fields = array_merge( $fields, $this->get_key_metrics_fields() ); 198 201 199 202 $fields = array_filter( … … 416 419 array( 417 420 /* translators: %s: module name */ 418 'label' => sprintf( __( '%s Shared Roles', 'google-site-kit' ), $module->name ),421 'label' => sprintf( __( '%s: Shared Roles', 'google-site-kit' ), $module->name ), 419 422 ), 420 423 $this->get_module_shared_role_names( $module_settings['sharedRoles'] ) … … 424 427 array( 425 428 /* translators: %s: module name */ 426 'label' => sprintf( __( '%s Management', 'google-site-kit' ), $module->name ),429 'label' => sprintf( __( '%s: Management', 'google-site-kit' ), $module->name ), 427 430 ), 428 431 $this->get_module_management( $module_settings['management'] ) … … 639 642 ); 640 643 } 644 645 /** 646 * Gets the key metrics status fields. 647 * 648 * @since 1.141.0 649 * 650 * @return array 651 */ 652 private function get_key_metrics_fields() { 653 $is_setup_complete = ( new Key_Metrics_Setup_Completed_By( $this->options ) )->get(); 654 $key_metrics_settings = ( new Key_Metrics_Settings( $this->user_options ) )->get(); 655 656 if ( ! $is_setup_complete ) { 657 return array( 658 'key_metrics_status' => array( 659 'label' => __( 'Key Metrics Status', 'google-site-kit' ), 660 'value' => __( 'Not setup', 'google-site-kit' ), 661 ), 662 ); 663 } 664 665 $key_metrics_status = isset( $key_metrics_settings['isWidgetHidden'] ) && $key_metrics_settings['isWidgetHidden'] ? 666 __( 'Setup and Disabled', 'google-site-kit' ) : 667 __( 'Setup and Enabled', 'google-site-kit' ); 668 669 // A minimum of 2 key metrics need to be saved to prevent "default" tailored metrics to render. 670 $key_metrics_source = isset( $key_metrics_settings['widgetSlugs'] ) && count( $key_metrics_settings['widgetSlugs'] ) > 1 ? 671 __( 'Manual Selection', 'google-site-kit' ) : 672 __( 'Tailored Metrics', 'google-site-kit' ); 673 674 return array( 675 'key_metrics_status' => array( 676 'label' => __( 'Key Metrics Status', 'google-site-kit' ), 677 'value' => $key_metrics_status, 678 ), 679 'key_metrics_source' => array( 680 'label' => __( 'Key Metrics Source', 'google-site-kit' ), 681 'value' => $key_metrics_source, 682 ), 683 ); 684 } 641 685 } -
google-site-kit/trunk/includes/Modules/AdSense.php
r3118692 r3201134 230 230 return array( 231 231 'adsense_account_id' => array( 232 'label' => __( 'AdSense account ID', 'google-site-kit' ),232 'label' => __( 'AdSense: Account ID', 'google-site-kit' ), 233 233 'value' => $settings['accountID'], 234 234 'debug' => Debug_Data::redact_debug_value( $settings['accountID'], 7 ), 235 235 ), 236 236 'adsense_client_id' => array( 237 'label' => __( 'AdSense client ID', 'google-site-kit' ),237 'label' => __( 'AdSense: Client ID', 'google-site-kit' ), 238 238 'value' => $settings['clientID'], 239 239 'debug' => Debug_Data::redact_debug_value( $settings['clientID'], 10 ), 240 240 ), 241 241 'adsense_account_status' => array( 242 'label' => __( 'AdSense account status', 'google-site-kit' ),242 'label' => __( 'AdSense: Account status', 'google-site-kit' ), 243 243 'value' => $settings['accountStatus'], 244 244 ), 245 245 'adsense_site_status' => array( 246 'label' => __( 'AdSense site status', 'google-site-kit' ),246 'label' => __( 'AdSense: Site status', 'google-site-kit' ), 247 247 'value' => $settings['siteStatus'], 248 248 ), 249 249 'adsense_use_snippet' => array( 250 'label' => __( 'AdSense snippet placed', 'google-site-kit' ),250 'label' => __( 'AdSense: Snippet placed', 'google-site-kit' ), 251 251 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 252 252 'debug' => $settings['useSnippet'] ? 'yes' : 'no', 253 253 ), 254 254 'adsense_web_stories_adunit_id' => array( 255 'label' => __( ' Web Stories Ad Unit ID', 'google-site-kit' ),255 'label' => __( 'AdSense: Web Stories Ad Unit ID', 'google-site-kit' ), 256 256 'value' => $settings['webStoriesAdUnit'], 257 257 'debug' => $settings['webStoriesAdUnit'], 258 258 ), 259 259 'adsense_setup_completed_timestamp' => array( 260 'label' => __( 'AdSense setup completed at', 'google-site-kit' ),260 'label' => __( 'AdSense: Setup completed at', 'google-site-kit' ), 261 261 'value' => $settings['setupCompletedTimestamp'] ? date_i18n( 262 262 get_option( 'date_format' ), … … 267 267 'adsense_abr_use_snippet' => array( 268 268 'label' => __( 269 'Ad Blocking Recovery snippet placed',269 'AdSense: Ad Blocking Recovery snippet placed', 270 270 'google-site-kit' 271 271 ), … … 275 275 'adsense_abr_use_error_protection_snippet' => array( 276 276 'label' => __( 277 'Ad Blocking Recovery error protection snippet placed',277 'AdSense: Ad Blocking Recovery error protection snippet placed', 278 278 'google-site-kit' 279 279 ), … … 283 283 'adsense_abr_setup_status' => array( 284 284 'label' => __( 285 'Ad Blocking Recovery setup status',285 'AdSense: Ad Blocking Recovery setup status', 286 286 'google-site-kit' 287 287 ), -
google-site-kit/trunk/includes/Modules/Ads.php
r3173125 r3201134 310 310 return array( 311 311 'ads_conversion_tracking_id' => array( 312 'label' => __( 'Ads Conversion Tracking ID', 'google-site-kit' ),312 'label' => __( 'Ads: Conversion Tracking ID', 'google-site-kit' ), 313 313 'value' => $settings['conversionID'], 314 314 'debug' => Debug_Data::redact_debug_value( $settings['conversionID'] ), -
google-site-kit/trunk/includes/Modules/Analytics_4.php
r3181737 r3201134 506 506 $debug_fields = array( 507 507 'analytics_4_account_id' => array( 508 'label' => __( 'Analytics account ID', 'google-site-kit' ),508 'label' => __( 'Analytics: Account ID', 'google-site-kit' ), 509 509 'value' => $settings['accountID'], 510 510 'debug' => Debug_Data::redact_debug_value( $settings['accountID'] ), 511 511 ), 512 512 'analytics_4_property_id' => array( 513 'label' => __( 'Analytics property ID', 'google-site-kit' ),513 'label' => __( 'Analytics: Property ID', 'google-site-kit' ), 514 514 'value' => $settings['propertyID'], 515 515 'debug' => Debug_Data::redact_debug_value( $settings['propertyID'], 7 ), 516 516 ), 517 517 'analytics_4_web_data_stream_id' => array( 518 'label' => __( 'Analytics web data stream ID', 'google-site-kit' ),518 'label' => __( 'Analytics: Web Data Stream ID', 'google-site-kit' ), 519 519 'value' => $settings['webDataStreamID'], 520 520 'debug' => Debug_Data::redact_debug_value( $settings['webDataStreamID'] ), 521 521 ), 522 522 'analytics_4_measurement_id' => array( 523 'label' => __( 'Analytics measurement ID', 'google-site-kit' ),523 'label' => __( 'Analytics: Measurement ID', 'google-site-kit' ), 524 524 'value' => $settings['measurementID'], 525 525 'debug' => Debug_Data::redact_debug_value( $settings['measurementID'] ), 526 526 ), 527 527 'analytics_4_use_snippet' => array( 528 'label' => __( 'Analytics snippet placed', 'google-site-kit' ),528 'label' => __( 'Analytics: Snippet placed', 'google-site-kit' ), 529 529 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 530 530 'debug' => $settings['useSnippet'] ? 'yes' : 'no', 531 531 ), 532 532 'analytics_4_ads_conversion_id' => array( 533 'label' => __( 'Analytics Ads conversion ID', 'google-site-kit' ),533 'label' => __( 'Analytics: Ads Conversion ID', 'google-site-kit' ), 534 534 'value' => $settings['adsConversionID'], 535 535 'debug' => Debug_Data::redact_debug_value( $settings['adsConversionID'] ), 536 536 ), 537 537 'analytics_4_available_custom_dimensions' => array( 538 'label' => __( 'Analytics available custom dimensions', 'google-site-kit' ),538 'label' => __( 'Analytics: Available Custom Dimensions', 'google-site-kit' ), 539 539 'value' => empty( $settings['availableCustomDimensions'] ) 540 540 ? __( 'None', 'google-site-kit' ) … … 549 549 ), 550 550 'analytics_4_ads_linked' => array( 551 'label' => __( 'Analytics Ads Linked', 'google-site-kit' ),551 'label' => __( 'Analytics: Ads Linked', 'google-site-kit' ), 552 552 'value' => $settings['adsLinked'] ? __( 'Connected', 'google-site-kit' ) : __( 'Not connected', 'google-site-kit' ), 553 553 'debug' => $settings['adsLinked'], 554 554 ), 555 555 'analytics_4_ads_linked_last_synced_at' => array( 556 'label' => __( 'Analytics Ads Linked Last Synced At', 'google-site-kit' ),556 'label' => __( 'Analytics: Ads Linked Last Synced At', 'google-site-kit' ), 557 557 'value' => $settings['adsLinkedLastSyncedAt'] ? gmdate( 'Y-m-d H:i:s', $settings['adsLinkedLastSyncedAt'] ) : __( 'Never synced', 'google-site-kit' ), 558 558 'debug' => $settings['adsLinkedLastSyncedAt'], … … 562 562 if ( $this->is_adsense_connected() ) { 563 563 $debug_fields['analytics_4_adsense_linked'] = array( 564 'label' => __( 'Analytics AdSense Linked', 'google-site-kit' ),564 'label' => __( 'Analytics: AdSense Linked', 'google-site-kit' ), 565 565 'value' => $settings['adSenseLinked'] ? __( 'Connected', 'google-site-kit' ) : __( 'Not connected', 'google-site-kit' ), 566 566 'debug' => Debug_Data::redact_debug_value( $settings['adSenseLinked'] ), … … 568 568 569 569 $debug_fields['analytics_4_adsense_linked_last_synced_at'] = array( 570 'label' => __( 'Analytics AdSense Linked Last Synced At', 'google-site-kit' ),570 'label' => __( 'Analytics: AdSense Linked Last Synced At', 'google-site-kit' ), 571 571 'value' => $settings['adSenseLinkedLastSyncedAt'] ? gmdate( 'Y-m-d H:i:s', $settings['adSenseLinkedLastSyncedAt'] ) : __( 'Never synced', 'google-site-kit' ), 572 572 'debug' => Debug_Data::redact_debug_value( $settings['adSenseLinkedLastSyncedAt'] ), … … 580 580 581 581 $debug_fields['analytics_4_site_kit_audiences'] = array( 582 'label' => __( 'Analytics site created audiences', 'google-site-kit' ),582 'label' => __( 'Analytics: Site created audiences', 'google-site-kit' ), 583 583 'value' => empty( $site_kit_audiences ) 584 584 ? __( 'None', 'google-site-kit' ) -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager.php
r3148853 r3201134 29 29 use Google\Site_Kit\Core\Modules\Module_With_Tag_Trait; 30 30 use Google\Site_Kit\Core\REST_API\Data_Request; 31 use Google\Site_Kit\Core\REST_API\Exception\Missing_Required_Param_Exception; 31 32 use Google\Site_Kit\Core\Site_Health\Debug_Data; 32 33 use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard; … … 34 35 use Google\Site_Kit\Core\Util\URL; 35 36 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings; 37 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState; 36 38 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard; 37 39 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers; … … 68 70 $this->register_scopes_hook(); 69 71 72 $synchronize_onboarding_state = new Synchronize_OnboardingState( 73 $this, 74 $this->user_options 75 ); 76 $synchronize_onboarding_state->register(); 77 78 add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) ); 79 add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) ); 80 70 81 // Reader Revenue Manager tag placement logic. 71 82 add_action( 'template_redirect', array( $this, 'register_tag' ) ); … … 192 203 protected function get_datapoint_definitions() { 193 204 return array( 194 'GET:publications' => array( 'service' => 'subscribewithgoogle' ), 205 'GET:publications' => array( 206 'service' => 'subscribewithgoogle', 207 ), 208 'POST:sync-publication-onboarding-state' => array( 209 'service' => 'subscribewithgoogle', 210 ), 195 211 ); 196 212 } … … 204 220 * @return RequestInterface|callable|WP_Error Request object or callable on success, or WP_Error on failure. 205 221 * 206 * @throws Invalid_Datapoint_Exception Thrown if the datapoint does not exist.222 * @throws Invalid_Datapoint_Exception|Missing_Required_Param_Exception Thrown if the datapoint does not exist or parameters are missing. 207 223 */ 208 224 protected function create_data_request( Data_Request $data ) { … … 216 232 $subscribewithgoogle = $this->get_service( 'subscribewithgoogle' ); 217 233 return $subscribewithgoogle->publications->listPublications( array( 'filter' => $this->get_publication_filter() ) ); 234 235 case 'POST:sync-publication-onboarding-state': 236 if ( empty( $data['publicationID'] ) ) { 237 throw new Missing_Required_Param_Exception( 'publicationID' ); 238 } 239 240 if ( empty( $data['publicationOnboardingState'] ) ) { 241 throw new Missing_Required_Param_Exception( 'publicationOnboardingState' ); 242 } 243 244 $publications = $this->get_data( 'publications' ); 245 246 if ( is_wp_error( $publications ) ) { 247 return $publications; 248 } 249 250 if ( empty( $publications ) ) { 251 return new WP_Error( 252 'publication_not_found', 253 __( 'Publication not found.', 'google-site-kit' ), 254 array( 'status' => 404 ) 255 ); 256 } 257 258 $publication = array_filter( 259 $publications, 260 function ( $publication ) use ( $data ) { 261 return $publication->getPublicationId() === $data['publicationID']; 262 } 263 ); 264 265 if ( empty( $publication ) ) { 266 return new WP_Error( 267 'publication_not_found', 268 __( 'Publication not found.', 'google-site-kit' ), 269 array( 'status' => 404 ) 270 ); 271 } 272 273 $publication = reset( $publication ); 274 $new_onboarding_state = $publication->getOnboardingState(); 275 276 if ( $new_onboarding_state === $data['publicationOnboardingState'] ) { 277 return function () { 278 return (object) array(); 279 }; 280 } 281 282 $settings = $this->get_settings(); 283 284 if ( $data['publicationID'] === $settings->get()['publicationID'] ) { 285 $settings->merge( 286 array( 287 'publicationOnboardingState' => $new_onboarding_state, 288 ) 289 ); 290 } 291 292 return function () use ( $data, $new_onboarding_state ) { 293 return (object) array( 294 'publicationID' => $data['publicationID'], 295 'publicationOnboardingState' => $new_onboarding_state, 296 ); 297 }; 218 298 } 219 299 … … 373 453 return array( 374 454 'reader_revenue_manager_publication_id' => array( 375 'label' => __( 'Reader Revenue Manager publication ID', 'google-site-kit' ),455 'label' => __( 'Reader Revenue Manager: Publication ID', 'google-site-kit' ), 376 456 'value' => $settings['publicationID'], 377 457 'debug' => Debug_Data::redact_debug_value( $settings['publicationID'] ), 378 458 ), 379 459 'reader_revenue_manager_publication_onboarding_state' => array( 380 'label' => __( 'Reader Revenue Manager publication onboarding state', 'google-site-kit' ),460 'label' => __( 'Reader Revenue Manager: Publication onboarding state', 'google-site-kit' ), 381 461 'value' => $settings['publicationOnboardingState'], 382 462 'debug' => $settings['publicationOnboardingState'], 383 463 ), 384 'reader_revenue_manager_publication_onboarding_state_last_synced_at' => array(385 'label' => __( 'Reader Revenue Manager publication onboarding state last synced at', 'google-site-kit' ),386 'value' => $settings['publicationOnboardingStateLastSyncedAtMs'] ? gmdate( 'Y-m-d H:i:s', $settings['publicationOnboardingStateLastSyncedAtMs'] / 1000 ) : __( 'Never synced', 'google-site-kit' ),387 'debug' => $settings['publicationOnboardingStateLastSyncedAtMs'],388 ),389 464 ); 390 465 } -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Settings.php
r3134468 r3201134 70 70 protected function get_default() { 71 71 return array( 72 'ownerID' => 0,73 'publicationID' => '',74 'publicationOnboardingState' => '',75 'publicationOnboardingState LastSyncedAtMs' => 0,72 'ownerID' => 0, 73 'publicationID' => '', 74 'publicationOnboardingState' => '', 75 'publicationOnboardingStateChanged' => false, 76 76 ); 77 77 } … … 103 103 } 104 104 105 if ( isset( $option['publicationOnboardingState LastSyncedAtMs'] ) ) {106 if ( ! is_ int( $option['publicationOnboardingStateLastSyncedAtMs'] ) ) {107 $option['publicationOnboardingState LastSyncedAtMs'] = 0;105 if ( isset( $option['publicationOnboardingStateChanged'] ) ) { 106 if ( ! is_bool( $option['publicationOnboardingStateChanged'] ) ) { 107 $option['publicationOnboardingStateChanged'] = false; 108 108 } 109 109 } -
google-site-kit/trunk/includes/Modules/Search_Console.php
r3148853 r3201134 166 166 return array( 167 167 'search_console_property' => array( 168 'label' => __( 'Search Console property', 'google-site-kit' ),168 'label' => __( 'Search Console: Property', 'google-site-kit' ), 169 169 'value' => $this->get_property_id(), 170 170 ), -
google-site-kit/trunk/includes/Modules/Sign_In_With_Google.php
r3191565 r3201134 11 11 namespace Google\Site_Kit\Modules; 12 12 13 use Google\Site_Kit\Core\Assets\Asset; 13 14 use Google\Site_Kit\Core\Assets\Script; 14 15 use Google\Site_Kit\Core\Conversion_Tracking\Conversion_Event_Providers\WooCommerce; … … 23 24 use Google\Site_Kit\Core\Modules\Module_With_Tag_Trait; 24 25 use Google\Site_Kit\Core\Modules\Tags\Module_Tag_Matchers; 26 use Google\Site_Kit\Core\Permissions\Permissions; 25 27 use Google\Site_Kit\Core\Site_Health\Debug_Data; 28 use Google\Site_Kit\Core\Storage\Options; 29 use Google\Site_Kit\Core\Storage\User_Options; 30 use Google\Site_Kit\Core\Util\BC_Functions; 26 31 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 32 use Google\Site_Kit\Modules\Sign_In_With_Google\Authenticator; 33 use Google\Site_Kit\Modules\Sign_In_With_Google\Authenticator_Interface; 34 use Google\Site_Kit\Modules\Sign_In_With_Google\Hashed_User_ID; 35 use Google\Site_Kit\Modules\Sign_In_With_Google\Profile_Reader; 27 36 use Google\Site_Kit\Modules\Sign_In_With_Google\Settings; 28 37 use Google\Site_Kit\Modules\Sign_In_With_Google\Tag_Matchers; 29 use Google\Site_Kit_Dependencies\Google_Client;30 38 use WP_Error; 39 use WP_User; 31 40 32 41 /** 33 * Class representing the Sign in With Google module.42 * Class representing the Sign in with Google module. 34 43 * 35 44 * @since 1.137.0 … … 50 59 51 60 /** 61 * Authentication action name. 62 */ 63 const ACTION_AUTH = 'googlesitekit_auth'; 64 65 /** 66 * Disconnect action name. 67 */ 68 const ACTION_DISCONNECT = 'googlesitekit_auth_disconnect'; 69 70 /** 52 71 * Registers functionality through WordPress hooks. 53 72 * 54 73 * @since 1.137.0 74 * @since 1.141.0 Add functionality to allow users to disconnect their own account and admins to disconnect any user. 55 75 */ 56 76 public function register() { 57 add_filter( 'wp_login_errors', array( $this, 'handle_google_auth_errors' ) ); 58 59 add_action( 'login_form_google_auth', array( $this, 'handle_google_auth' ) ); 77 add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) ); 78 79 add_action( 80 'login_form_' . self::ACTION_AUTH, 81 function () { 82 $settings = $this->get_settings(); 83 84 $profile_reader = new Profile_Reader( $settings ); 85 $authenticator = new Authenticator( $this->user_options, $profile_reader ); 86 87 $this->handle_auth_callback( $authenticator ); 88 } 89 ); 90 91 add_action( 'admin_action_' . self::ACTION_DISCONNECT, fn () => $this->handle_disconnect_user() ); 92 60 93 add_action( 'login_form', $this->get_method_proxy( 'render_signin_button' ) ); 61 } 62 63 /** 64 * Intercept the page request to process token ID 65 * and complete Sign in with Google flow. 66 * 67 * @since 1.140.0 68 */ 69 public function handle_google_auth() { 70 $request_method = $this->context->input()->filter( INPUT_SERVER, 'REQUEST_METHOD' ); 71 94 95 add_action( 'show_user_profile', $this->get_method_proxy( 'render_disconnect_profile' ) ); // This action shows the disconnect section on the users own profile page. 96 add_action( 'edit_user_profile', $this->get_method_proxy( 'render_disconnect_profile' ) ); // This action shows the disconnect section on other users profile page to allow admins to disconnect others. 97 98 add_action( 'woocommerce_login_form_start', $this->get_method_proxy( 'render_signin_button' ) ); 99 } 100 101 /** 102 * Handles the callback request after the user signs in with Google. 103 * 104 * @since 1.140.0 105 * 106 * @param Authenticator_Interface $authenticator Authenticator instance. 107 */ 108 private function handle_auth_callback( Authenticator_Interface $authenticator ) { 109 $input = $this->context->input(); 110 111 // Ignore the request if the request method is not POST. 112 $request_method = $input->filter( INPUT_SERVER, 'REQUEST_METHOD' ); 72 113 if ( 'POST' !== $request_method ) { 73 114 return; 74 115 } 75 116 76 $csrf_cookie = $this->context->input()->filter( INPUT_COOKIE, 'g_csrf_token' ); 77 $csrf_post = $this->context->input()->filter( INPUT_POST, 'g_csrf_token' ); 78 79 if ( 80 ! $csrf_cookie || 81 ! $csrf_post || 82 $csrf_cookie !== $csrf_post 83 ) { 84 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_g_csrf_token', wp_login_url() ) ); 85 exit; 86 } 87 88 $client_id = $this->get_settings()->get()['clientID']; 89 $id_token = $this->context->input()->filter( INPUT_POST, 'credential' ); 90 try { 91 $client = new Google_Client( array( 'client_id' => $client_id ) ); 92 $payload = $client->verifyIdToken( $id_token ); 93 94 if ( empty( $payload ) ) { 95 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_request', wp_login_url() ) ); 96 exit; 97 } 98 99 // @TODO implement further flow using $payload in #9339. 100 101 } catch ( \Exception $e ) { 102 wp_safe_redirect( add_query_arg( 'error', 'google_auth_invalid_request', wp_login_url() ) ); 117 $redirect_to = $authenticator->authenticate_user( $input ); 118 if ( ! empty( $redirect_to ) ) { 119 wp_safe_redirect( $redirect_to ); 103 120 exit; 104 121 } … … 113 130 * @return WP_Error $error WP_Error instance. 114 131 */ 115 public function handle_ google_auth_errors( $error ) {132 public function handle_login_errors( $error ) { 116 133 $error_code = $this->context->input()->filter( INPUT_GET, 'error' ); 117 134 if ( ! $error_code ) { … … 120 137 121 138 switch ( $error_code ) { 122 case 'google_auth_invalid_request': 123 case 'google_auth_invalid_g_csrf_token': 124 $error->add( 'google_auth', __( 'Sign in with Google failed.', 'google-site-kit' ) ); 139 case Authenticator::ERROR_INVALID_REQUEST: 140 $error->add( self::MODULE_SLUG, __( 'Sign in with Google failed.', 'google-site-kit' ) ); 141 break; 142 case Authenticator::ERROR_SIGNIN_FAILED: 143 $error->add( self::MODULE_SLUG, __( 'The user is not registered on this site.', 'google-site-kit' ) ); 125 144 break; 126 145 default: … … 206 225 public function is_connected() { 207 226 $options = $this->get_settings()->get(); 208 209 227 if ( empty( $options['clientID'] ) ) { 210 228 return false; … … 220 238 */ 221 239 private function render_signin_button() { 240 global $wp; 241 $is_woo_commerce_login = 'my-account' === $wp->request; 242 222 243 $settings = $this->get_settings()->get(); 223 244 if ( ! $settings['clientID'] ) { … … 225 246 } 226 247 227 $ redirect_url = add_query_arg( 'action', 'google_auth', wp_login_url() );228 if ( substr( $ redirect_url, 0, 5 ) !== 'https' ) {248 $login_uri = add_query_arg( 'action', self::ACTION_AUTH, wp_login_url() ); 249 if ( substr( $login_uri, 0, 5 ) !== 'https' ) { 229 250 return; 230 251 } 231 252 253 $redirect_to = $this->context->input()->filter( INPUT_GET, 'redirect_to' ); 254 if ( ! empty( $redirect_to ) ) { 255 $redirect_to = trim( $redirect_to ); 256 } 257 258 $btn_args = array( 259 'theme' => $settings['theme'], 260 'text' => $settings['text'], 261 'shape' => $settings['shape'], 262 ); 263 232 264 // Render the Sign in with Google button and related inline styles. 265 printf( "\n<!-- %s -->\n", esc_html__( 'Sign in with Google button added by Site Kit', 'google-site-kit' ) ); 266 BC_Functions::wp_print_script_tag( array( 'src' => 'https://accounts.google.com/gsi/client' ) ); 267 ob_start(); 233 268 ?> 234 <!-- <?php echo esc_html__( 'Sign in with Google button added by Site Kit', 'google-site-kit' ); ?> -->235 <?php /* phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript */ ?>236 <script src="https://accounts.google.com/gsi/client"></script>237 <script>238 269 ( () => { 239 google.accounts.id.initialize({ 270 const parent = document.createElement( 'div' ); 271 <?php if ( $is_woo_commerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 272 document.getElementsByClassName( 'login' )[0]?.insertBefore( parent, document.getElementsByClassName( 'woocommerce-form-row' )[0] ); 273 <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 274 document.getElementById( 'login' ).insertBefore( parent, document.getElementById( 'loginform' ) ); 275 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 276 277 async function handleCredentialResponse( response ) { 278 try { 279 const res = await fetch( '<?php echo esc_js( $login_uri ); ?>', { 280 method: 'POST', 281 headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 282 body: new URLSearchParams( response ) 283 }); 284 if ( res.ok && res.redirected ) { 285 location.assign( res.url ); 286 } 287 } catch( error ) { 288 console.error( error ); 289 } 290 } 291 292 google.accounts.id.initialize( { 240 293 client_id: '<?php echo esc_js( $settings['clientID'] ); ?>', 241 login_uri: '<?php echo esc_js( $redirect_url ); ?>', 242 ux_mode: 'redirect', 243 }); 244 const parent = document.createElement( 'div' ); 245 document.getElementById( 'login').insertBefore( parent, document.getElementById( 'loginform' ) ); 246 google.accounts.id.renderButton(parent, { 247 theme: '<?php echo esc_js( $settings['theme'] ); ?>', 248 text: '<?php echo esc_js( $settings['text'] ); ?>', 249 shape: '<?php echo esc_js( $settings['shape'] ); ?>' 250 }); 294 callback: handleCredentialResponse, 295 } ); 296 297 google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> ); 298 299 <?php if ( $settings['oneTapEnabled'] ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 300 google.accounts.id.prompt(); 301 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 302 303 <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 304 const expires = new Date(); 305 expires.setTime( expires.getTime() + 1000 * 60 * 5 ); 306 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() ); ?>"; 307 <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?> 251 308 } )(); 252 </script>253 <!-- <?php echo esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ); ?> -->254 309 <?php 310 BC_Functions::wp_print_inline_script_tag( ob_get_clean() ); 311 printf( "\n<!-- %s -->\n", esc_html__( 'End Sign in with Google button added by Site Kit', 'google-site-kit' ) ); 255 312 } 256 313 … … 260 317 * @since 1.140.0 261 318 * 262 * @return array319 * @return int 263 320 */ 264 321 public function get_authenticated_users_count() { 265 322 global $wpdb; 266 323 267 $settings = $this->get_settings();268 324 // phpcs:ignore WordPress.DB.DirectDatabaseQuery 269 return $wpdb->query( 270 $wpdb->prepare( "SELECT count(id) FROM $wpdb->usermeta WHERE meta_key = %s", self::GOOGLE_USER_ID_OPTION ) 325 return (int) $wpdb->get_var( 326 $wpdb->prepare( 327 "SELECT COUNT( user_id ) FROM $wpdb->usermeta WHERE meta_key = %s", 328 $this->user_options->get_meta_key( Hashed_User_ID::OPTION ) 329 ) 271 330 ); 272 331 } … … 282 341 $settings = $this->get_settings()->get(); 283 342 284 // TODO Uncomment and remove fixed value after #9339 is merged. 285 // $authenticated_user_count = $this->get_authenticated_users_count();. 286 $authenticated_user_count = 1; 343 $authenticated_user_count = $this->get_authenticated_users_count(); 287 344 288 345 $debug_fields = array( 289 346 'sign_in_with_google_client_id' => array( 290 'label' => __( 'Sign in with Google Client ID', 'google-site-kit' ),347 'label' => __( 'Sign in with Google: Client ID', 'google-site-kit' ), 291 348 'value' => $settings['clientID'], 292 349 'debug' => Debug_Data::redact_debug_value( $settings['clientID'] ), 293 350 ), 294 351 'sign_in_with_google_shape' => array( 295 'label' => __( 'Sign in with Google Shape', 'google-site-kit' ),352 'label' => __( 'Sign in with Google: Shape', 'google-site-kit' ), 296 353 'value' => $this->get_settings()->get_label( 'shape', $settings['shape'] ), 297 354 'debug' => $settings['shape'], 298 355 ), 299 356 'sign_in_with_google_text' => array( 300 'label' => __( 'Sign in with Google Text', 'google-site-kit' ),357 'label' => __( 'Sign in with Google: Text', 'google-site-kit' ), 301 358 'value' => $this->get_settings()->get_label( 'text', $settings['text'] ), 302 359 'debug' => $settings['text'], 303 360 ), 304 361 'sign_in_with_google_theme' => array( 305 'label' => __( 'Sign in with Google Theme', 'google-site-kit' ),362 'label' => __( 'Sign in with Google: Theme', 'google-site-kit' ), 306 363 'value' => $this->get_settings()->get_label( 'theme', $settings['theme'] ), 307 364 'debug' => $settings['theme'], 308 365 ), 309 366 'sign_in_with_google_use_snippet' => array( 310 'label' => __( 'Sign in with Google One-tap Enabled', 'google-site-kit' ),367 'label' => __( 'Sign in with Google: One-tap Enabled', 'google-site-kit' ), 311 368 'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 312 369 'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no', 313 370 ), 314 371 'sign_in_with_google_authenticated_user_count' => array( 315 'label' => __( 'Sign in with Google Number of users who have authenticated using Sign in with Google', 'google-site-kit' ),372 'label' => __( 'Sign in with Google: Number of users who have authenticated using Sign in with Google', 'google-site-kit' ), 316 373 'value' => $authenticated_user_count, 317 374 'debug' => $authenticated_user_count, … … 394 451 return Module_Tag_Matchers::NO_TAG_FOUND; 395 452 } 453 454 /** 455 * Returns the disconnect URL for the specified user. 456 * 457 * @since 1.141.0 458 * 459 * @param int $user_id WordPress User ID. 460 */ 461 public static function disconnect_url( $user_id ) { 462 return add_query_arg( 463 array( 464 'action' => self::ACTION_DISCONNECT, 465 'nonce' => wp_create_nonce( self::ACTION_DISCONNECT . '-' . $user_id ), 466 'user_id' => $user_id, 467 ), 468 admin_url( 'index.php' ) 469 ); 470 } 471 472 /** 473 * Handles the disconnect action. 474 * 475 * @since 1.141.0 476 */ 477 public function handle_disconnect_user() { 478 $input = $this->context->input(); 479 $nonce = $input->filter( INPUT_GET, 'nonce' ); 480 $user_id = (int) $input->filter( INPUT_GET, 'user_id' ); 481 $action = self::ACTION_DISCONNECT . '-' . $user_id; 482 483 if ( ! wp_verify_nonce( $nonce, $action ) ) { 484 $this->authentication->invalid_nonce_error( $action ); 485 } 486 487 // Only allow this action for admins or users own setting. 488 if ( current_user_can( 'edit_user', $user_id ) ) { 489 $hashed_user_id = new Hashed_User_ID( new User_Options( $this->context, $user_id ) ); 490 $hashed_user_id->delete(); 491 wp_safe_redirect( add_query_arg( 'updated', true, get_edit_user_link( $user_id ) ) ); 492 exit; 493 } 494 495 wp_safe_redirect( get_edit_user_link( $user_id ) ); 496 exit; 497 } 498 499 /** 500 * Displays a disconnect button on user profile pages. 501 * 502 * @since 1.141.0 503 * 504 * @param WP_User $user WordPress user object. 505 */ 506 private function render_disconnect_profile( WP_User $user ) { 507 if ( ! current_user_can( 'edit_user', $user->ID ) ) { 508 return; 509 } 510 511 $hashed_user_id = new Hashed_User_ID( new User_Options( $this->context, $user->ID ) ); 512 $current_user_google_id = $hashed_user_id->get(); 513 514 // Don't show if the user does not have a Google ID saved in user meta. 515 if ( empty( $current_user_google_id ) ) { 516 return; 517 } 518 519 ?> 520 <div id="googlesitekit-sign-in-with-google-disconnect"> 521 <h2><?php esc_html_e( 'Sign in with Google via Site Kit by Google', 'google-site-kit' ); ?></h2> 522 <p> 523 <?php 524 if ( get_current_user_id() === $user->ID ) { 525 esc_html_e( 526 'You can sign in with your Google account.', 527 'google-site-kit' 528 ); 529 } else { 530 esc_html_e( 531 'This user can sign in with their Google account.', 532 'google-site-kit' 533 ); 534 } 535 ?> 536 </p> 537 <p> 538 <a 539 class="button button-secondary" 540 href="<?php echo esc_url( self::disconnect_url( $user->ID ) ); ?>" 541 > 542 <?php esc_html_e( 'Disconnect Google Account', 'google-site-kit' ); ?> 543 </a> 544 </p> 545 </div> 546 <?php 547 } 396 548 } -
google-site-kit/trunk/includes/Modules/Tag_Manager.php
r3118692 r3201134 174 174 return array( 175 175 'tagmanager_account_id' => array( 176 'label' => __( 'Tag Manager account ID', 'google-site-kit' ),176 'label' => __( 'Tag Manager: Account ID', 'google-site-kit' ), 177 177 'value' => $settings['accountID'], 178 178 'debug' => Debug_Data::redact_debug_value( $settings['accountID'] ), 179 179 ), 180 180 'tagmanager_container_id' => array( 181 'label' => __( 'Tag Manager container ID', 'google-site-kit' ),181 'label' => __( 'Tag Manager: Container ID', 'google-site-kit' ), 182 182 'value' => $settings['containerID'], 183 183 'debug' => Debug_Data::redact_debug_value( $settings['containerID'], 7 ), 184 184 ), 185 185 'tagmanager_amp_container_id' => array( 186 'label' => __( 'Tag Manager AMP container ID', 'google-site-kit' ),186 'label' => __( 'Tag Manager: AMP Container ID', 'google-site-kit' ), 187 187 'value' => $settings['ampContainerID'], 188 188 'debug' => Debug_Data::redact_debug_value( $settings['ampContainerID'], 7 ), 189 189 ), 190 190 'tagmanager_use_snippet' => array( 191 'label' => __( 'Tag Manager snippet placed', 'google-site-kit' ),191 'label' => __( 'Tag Manager: Snippet placed', 'google-site-kit' ), 192 192 'value' => $settings['useSnippet'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ), 193 193 'debug' => $settings['useSnippet'] ? 'yes' : 'no', -
google-site-kit/trunk/includes/Plugin.php
r3164469 r3201134 227 227 ( new Core\Tags\GTag() )->register(); 228 228 ( new Core\Conversion_Tracking\Conversion_Tracking( $this->context, $options ) )->register(); 229 if ( Feature_Flags::enabled( 'firstPartyMode' ) ) { 230 ( new Core\Tags\First_Party_Mode\First_Party_Mode( $this->context, $options ) )->register(); 231 } 229 232 230 233 // If a login is happening (runs after 'init'), update current user in dependency chain. -
google-site-kit/trunk/includes/vendor/composer/autoload_classmap.php
r3191565 r3201134 177 177 'Google\\Site_Kit\\Core\\Storage\\User_Transients' => $baseDir . '/Core/Storage/User_Transients.php', 178 178 'Google\\Site_Kit\\Core\\Tags\\Blockable_Tag_Interface' => $baseDir . '/Core/Tags/Blockable_Tag_Interface.php', 179 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\First_Party_Mode' => $baseDir . '/Core/Tags/First_Party_Mode/First_Party_Mode.php', 180 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\First_Party_Mode_Settings' => $baseDir . '/Core/Tags/First_Party_Mode/First_Party_Mode_Settings.php', 181 'Google\\Site_Kit\\Core\\Tags\\First_Party_Mode\\REST_First_Party_Mode_Controller' => $baseDir . '/Core/Tags/First_Party_Mode/REST_First_Party_Mode_Controller.php', 179 182 'Google\\Site_Kit\\Core\\Tags\\GTag' => $baseDir . '/Core/Tags/GTag.php', 180 183 'Google\\Site_Kit\\Core\\Tags\\Guards\\Tag_Environment_Type_Guard' => $baseDir . '/Core/Tags/Guards/Tag_Environment_Type_Guard.php', … … 301 304 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager' => $baseDir . '/Modules/Reader_Revenue_Manager.php', 302 305 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php', 306 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php', 303 307 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php', 304 308 'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php', … … 307 311 'Google\\Site_Kit\\Modules\\Search_Console\\Settings' => $baseDir . '/Modules/Search_Console/Settings.php', 308 312 'Google\\Site_Kit\\Modules\\Sign_In_With_Google' => $baseDir . '/Modules/Sign_In_With_Google.php', 313 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Authenticator' => $baseDir . '/Modules/Sign_In_With_Google/Authenticator.php', 314 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Authenticator_Interface' => $baseDir . '/Modules/Sign_In_With_Google/Authenticator_Interface.php', 315 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Hashed_User_ID' => $baseDir . '/Modules/Sign_In_With_Google/Hashed_User_ID.php', 316 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Profile_Reader' => $baseDir . '/Modules/Sign_In_With_Google/Profile_Reader.php', 317 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Profile_Reader_Interface' => $baseDir . '/Modules/Sign_In_With_Google/Profile_Reader_Interface.php', 309 318 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Settings' => $baseDir . '/Modules/Sign_In_With_Google/Settings.php', 310 319 'Google\\Site_Kit\\Modules\\Sign_In_With_Google\\Tag_Matchers' => $baseDir . '/Modules/Sign_In_With_Google/Tag_Matchers.php', -
google-site-kit/trunk/readme.txt
r3191565 r3201134 5 5 Tested up to: 6.7 6 6 Requires PHP: 7.4 7 Stable tag: 1.14 0.07 Stable tag: 1.141.0 8 8 License: Apache License 2.0 9 9 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 110 110 == Changelog == 111 111 112 = 1.14 0.0 =112 = 1.141.0 = 113 113 114 114 **Added** 115 115 116 * Add Sign in with Google to Site Health. See [#9571](https://github.com/google/site-kit-wp/issues/9571). 117 * Add new feature notification for Sign in with Google module. See [#9335](https://github.com/google/site-kit-wp/issues/9335). 116 * Add Sign in with Google to WooCommerce login page. See [#9340](https://github.com/google/site-kit-wp/issues/9340). 118 117 119 118 **Enhanced** 120 119 121 * Add a survey to be triggered when audience groups are set up. See [#9656](https://github.com/google/site-kit-wp/issues/9656). 122 * Update styles for the admin settings. See [#9580](https://github.com/google/site-kit-wp/issues/9580). 123 * Add GA event tracking for user interactions with the Audience Segmentation Setup in the Settings section. See [#9499](https://github.com/google/site-kit-wp/issues/9499). 124 * Add opt-in event tracking for the Audience Segmentation introductory popup/banner. See [#9498](https://github.com/google/site-kit-wp/issues/9498). 125 * Add GA event tracking for user interactions with the Audience Selection Panel. See [#9497](https://github.com/google/site-kit-wp/issues/9497). 126 * Add opt-in user activity tracking in the audience tiles area. See [#9494](https://github.com/google/site-kit-wp/issues/9494). 127 * Add opt-in user activity tracking in the audience setup CTA widget and related setting areas. See [#9493](https://github.com/google/site-kit-wp/issues/9493). 128 * Don't unnecessarily render the Key Metrics Selection Panel into the DOM. See [#9468](https://github.com/google/site-kit-wp/issues/9468). 129 * Add a stub survey trigger that is called when viewing the Reader Revenue Manager Setup CTA. See [#9447](https://github.com/google/site-kit-wp/issues/9447). 130 * Update the widget area renderer to accept React components for subtitles. See [#9444](https://github.com/google/site-kit-wp/issues/9444). 131 * Add modal of tailored metrics to User Input Questionnaire. See [#9439](https://github.com/google/site-kit-wp/issues/9439). 132 * Add confirmation modal for users changing key metrics. See [#9438](https://github.com/google/site-kit-wp/issues/9438). 133 * Add support for lost events to Conversion Reporting events datastore. See [#9379](https://github.com/google/site-kit-wp/issues/9379). 134 * Add a new "Chip Tab Group" component. See [#9378](https://github.com/google/site-kit-wp/issues/9378). 135 * Add new notification to Key Metrics Widget Settings Area. See [#9344](https://github.com/google/site-kit-wp/issues/9344). 136 * Implement the Sign in with Google callback action. See [#9338](https://github.com/google/site-kit-wp/issues/9338). 137 * Fix a bug that prevented the appearance of the Reader Revenue Manager setup banner graphic. See [#9329](https://github.com/google/site-kit-wp/issues/9329). 138 * Include a "Learn more" link on the Reader Revenue Manager setup screen shown when the user doesn't have an existing publication. See [#9259](https://github.com/google/site-kit-wp/issues/9259). 120 * Update Sign in with Google descriptions in Site Health. See [#9680](https://github.com/google/site-kit-wp/issues/9680). 121 * Update the Sign in with Google login to use the popup approach. See [#9677](https://github.com/google/site-kit-wp/issues/9677). 122 * Integrate the First-party mode proxy script that will allow Analytics events to be tracked via requests made from the browser to the user's site rather than directly to Google's servers. See [#9665](https://github.com/google/site-kit-wp/issues/9665). 123 * Add info to the "One-tap" option in Sign in with Google settings. See [#9643](https://github.com/google/site-kit-wp/issues/9643). 124 * Do not show "Maybe later" in Key Metrics Admin Settings callout banner. See [#9636](https://github.com/google/site-kit-wp/issues/9636). 125 * Implement the `fetchGetFPMServerRequirementStatus()` Redux action used to retrieve the FPM server requirement status. See [#9634](https://github.com/google/site-kit-wp/issues/9634). 126 * Add an `fpm-server-requirement-status` API endpoint to verify First-Party Mode readiness by performing FPFE health checks and verifying direct PHP script access. See [#9632](https://github.com/google/site-kit-wp/issues/9632). 127 * Add a partial datastore for First-Party Mode in the `core/site` datastore to manage its settings. See [#9628](https://github.com/google/site-kit-wp/issues/9628). 128 * Add REST endpoints for First-Party Mode module settings. See [#9625](https://github.com/google/site-kit-wp/issues/9625). 129 * Update "Get your Client ID" link in Sign in with Google setup. See [#9621](https://github.com/google/site-kit-wp/issues/9621). 130 * Ensure tailored metrics override previous metrics when switching from manually-selected metrics. See [#9613](https://github.com/google/site-kit-wp/issues/9613). 131 * Improve the accuracy of the mechanism that scrolls the user to a widget area. See [#9603](https://github.com/google/site-kit-wp/issues/9603). 132 * Improve visitor groups selection panel to prevent a console warning. See [#9602](https://github.com/google/site-kit-wp/issues/9602). 133 * Add an external icon to external links in the audience selection panel and placeholder tile. See [#9598](https://github.com/google/site-kit-wp/issues/9598). 134 * Remove visitor groups setup success notifications when the user chooses not to display visitor groups in dashboard. See [#9596](https://github.com/google/site-kit-wp/issues/9596). 135 * Introduce grouping of notification queues. See [#9568](https://github.com/google/site-kit-wp/issues/9568). 136 * Add notice for users who used a legacy answer in Key Metrics settings. See [#9518](https://github.com/google/site-kit-wp/issues/9518). 137 * Split the "Sell products or services" answer in the User Input app. See [#9489](https://github.com/google/site-kit-wp/issues/9489). 138 * Persist selection group in Key Metrics selection panel. See [#9385](https://github.com/google/site-kit-wp/issues/9385). 139 * Add support for disconnecting associated Google account for sign in from WordPress user edit screen. See [#9380](https://github.com/google/site-kit-wp/issues/9380). 140 * Implement new subtle notification banner in KMW dashboard area. See [#9371](https://github.com/google/site-kit-wp/issues/9371). 141 * Move on-demand onboarding state synchronization to the server side, avoiding the need to reload the full list of publications. See [#9363](https://github.com/google/site-kit-wp/issues/9363). 142 * Improve selection panels so that they perform actions only when in view. See [#9312](https://github.com/google/site-kit-wp/issues/9312). 143 * Improve Reader Revenue Manager publication onboarding state synchronization. See [#9149](https://github.com/google/site-kit-wp/issues/9149). 144 * Add Key Metrics info to Site Health report. See [#9112](https://github.com/google/site-kit-wp/issues/9112). 145 146 **Changed** 147 148 * Implement settings view for Sign in with Google. See [#9477](https://github.com/google/site-kit-wp/issues/9477). 149 * Implement Sign in with Google token response login handling. See [#9339](https://github.com/google/site-kit-wp/issues/9339). 139 150 140 151 **Fixed** 141 152 142 * Only place the Reader Revenue Manager snippet on singular WordPress posts. See [#9670](https://github.com/google/site-kit-wp/issues/9670). 143 * Fix typo in Key Metrics Widget. See [#9614](https://github.com/google/site-kit-wp/issues/9614). 144 * Fix the issue where an extra "Failed to enable metric" modal appears when canceled in the Audience Segmentation "Top Content" custom dimension creation flow. See [#9563](https://github.com/google/site-kit-wp/issues/9563). 145 * Fix dashboard error when selecting specific key metrics on the view-only dashboard. See [#9548](https://github.com/google/site-kit-wp/issues/9548). 146 * Remove the “Temporarily hidden” badge when temporarily hidden tiles reappear with only a single tile visible. See [#9472](https://github.com/google/site-kit-wp/issues/9472). 147 * Ensure "Add a metric" tiles are always visible on the view-only dashboard when fewer than 4 metrics are available or fewer than 8 metrics if the `conversionReporting` feature flag is enabled. See [#8712](https://github.com/google/site-kit-wp/issues/8712). 153 * Fix a bug that caused a custom dimension to not be created while setting up visitor groups. See [#9597](https://github.com/google/site-kit-wp/issues/9597). 148 154 149 155 [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.