Changeset 3479192
- Timestamp:
- 03/10/2026 03:16:59 PM (3 weeks ago)
- Location:
- google-site-kit
- Files:
-
- 84 added
- 62 deleted
- 126 edited
- 1 copied
-
tags/1.174.0 (copied) (copied from google-site-kit/trunk)
-
tags/1.174.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json (modified) (1 diff)
-
tags/1.174.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json (modified) (1 diff)
-
tags/1.174.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json (modified) (1 diff)
-
tags/1.174.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json (modified) (1 diff)
-
tags/1.174.0/dist/assets/blocks/sign-in-with-google/block.json (modified) (3 diffs)
-
tags/1.174.0/dist/assets/blocks/sign-in-with-google/v3/block.json (modified) (1 diff)
-
tags/1.174.0/dist/assets/css/googlesitekit-admin-css-b0a55e41cd054885c01d.min.css (added)
-
tags/1.174.0/dist/assets/css/googlesitekit-admin-css-d9aa9ae0497bce9f2e2b.min.css (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-activation-33cfec7e5d5ce1d52c84.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-activation-a18418b23eed5131e342.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-ad-blocking-recovery-781b5e4c086bb56009ee.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-ad-blocking-recovery-b2c14915cb4d745197eb.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-admin-pointers-tracking-aaf3edcbdbcc6193ae8f.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-admin-pointers-tracking-c845ba1cde77a0f3bc14.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-adminbar-8b23f8ec0b9885d93b72.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-adminbar-edc2347b3d5db1c50fe9.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-api-1b42ccd8014a64002e13.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-api-6b742f1f3e956905b33c.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-block-tracking-15a11a002738d55d094b.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-block-tracking-562fd213268d8cb25f04.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-forms-5c9a265fe07db133d11e.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-forms-75b32a3db427355b3d54.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-site-0ad3830862d5da40c7cc.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-site-d81d1d7e77fb878db074.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-ui-6ae38e48c7d1c550209c.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-ui-aae8b190894508c436a3.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-user-50662a4a25e8662f50d2.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-datastore-user-ee3b9189c8a41f17a304.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-entity-dashboard-50d1fe8d423ac6604e9a.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-entity-dashboard-b61e170cdb6b569e03bb.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-key-metrics-setup-acc873033a51c241703a.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-key-metrics-setup-f327cd289672fb9d8d5c.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-main-dashboard-0712bc98382fa42245ba.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-main-dashboard-4385a32f5ff0102cb3d2.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-metric-selection-878a437e42477c6d1739.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-metric-selection-c09232a39f84c396a99f.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-019df226afc930fb7baa.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-ads-87ff0f042c3f8bb75ffe.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-ads-f2cd5b1ca68cdc0afafc.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-adsense-caf75cf03cc3f65ad722.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-adsense-da3acba40b247879cea2.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-analytics-4-08baceaf34b9dc342006.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-analytics-4-6c316f95903d72619464.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-ec132025723e115c493e.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-pagespeed-insights-6460d6ee27011faeb822.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-pagespeed-insights-e61b3aaa46e17ebf457f.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-reader-revenue-manager-28b1f326a7af16311546.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-reader-revenue-manager-35a4e97b0acf40878735.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-search-console-42651fba89fd889cbbe8.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-search-console-878bb1ae8fdd94ea3668.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-sign-in-with-google-99767d36de8ec7cc6fd9.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-sign-in-with-google-aa284c1fba6c038e71ff.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-tagmanager-c24942280b3785810fd1.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-modules-tagmanager-d3dc9c4311dfd79986ce.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-notifications-aa32e0cf3becd3087d95.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-notifications-d97f80ea7c9788e8616a.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-settings-244369c6fd856ce6cdf5.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-settings-83ebe6d5a541de36c404.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-splash-46fa2e595d002163ed1b.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-splash-f26e7cde106af6278046.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-user-input-ace5668810c71164dfe0.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-user-input-c6ffcdff35f0c900e28b.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-widgets-291ae05540f5ce1d4b5f.js (added)
-
tags/1.174.0/dist/assets/js/googlesitekit-widgets-c56d4ffc3e0d41ad8632.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-wp-dashboard-a5d6a1d4bf8a176fcac7.js (deleted)
-
tags/1.174.0/dist/assets/js/googlesitekit-wp-dashboard-eec86376ce895eb5422a.js (added)
-
tags/1.174.0/dist/config.php (modified) (1 diff)
-
tags/1.174.0/dist/manifest.php (modified) (1 diff)
-
tags/1.174.0/google-site-kit.php (modified) (2 diffs)
-
tags/1.174.0/includes/Context.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Admin/Screens.php (modified) (4 diffs)
-
tags/1.174.0/includes/Core/Assets/Script.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Authentication/Authentication.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/Authentication/Clients/Client_Factory.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Authentication/Disconnected_Reason.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Body_Content_Map.php (deleted)
-
tags/1.174.0/includes/Core/Email_Reporting/Content_Map.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/Eligible_Subscribers_Query.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Assets.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Log.php (modified) (4 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Log_Batch_Query.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Log_Processor.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Report_Sender.php (modified) (5 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting.php (modified) (8 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Data_Requests.php (modified) (4 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Golink_Handler.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Pointer.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Formatter.php (modified) (8 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Renderer.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Renderer_Factory.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Initiator_Task.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Plain_Text_Formatter.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php (modified) (8 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Sections_Map.php (modified) (7 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/Subscription_Confirmation_Task.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/header.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions-metric-part.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/template.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/error-email (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/error-email/parts (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/error-email/parts/content.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/error-email/parts/header.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/error-email/template.php (added)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/invitation-email/template.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/subscription-confirmation/parts/content.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Email_Reporting/templates/subscription-confirmation/template.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Golinks (added)
-
tags/1.174.0/includes/Core/Golinks/Dashboard_Golink_Handler.php (added)
-
tags/1.174.0/includes/Core/Golinks/Golink_Handler_Interface.php (added)
-
tags/1.174.0/includes/Core/Golinks/Golinks.php (added)
-
tags/1.174.0/includes/Core/Modules/Module_With_Owner.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Permissions/Permissions.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Storage/Encrypted_User_Options.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/User/Email_Reporting.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/User/REST_Email_Reporting_Controller.php (modified) (3 diffs)
-
tags/1.174.0/includes/Core/User_Input/Site_Specific_Answers.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/User_Input/User_Specific_Answers.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Util/BC_Functions.php (modified) (1 diff)
-
tags/1.174.0/includes/Core/Util/Entity_Factory.php (modified) (2 diffs)
-
tags/1.174.0/includes/Core/Util/URL.php (modified) (2 diffs)
-
tags/1.174.0/includes/Modules/Analytics_4.php (modified) (2 diffs)
-
tags/1.174.0/includes/Modules/Analytics_4/Audience_Utilities.php (modified) (2 diffs)
-
tags/1.174.0/includes/Modules/Analytics_4/Synchronize_AdSenseLinked.php (modified) (2 diffs)
-
tags/1.174.0/includes/Modules/Reader_Revenue_Manager.php (modified) (3 diffs)
-
tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php (modified) (1 diff)
-
tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Settings.php (modified) (4 diffs)
-
tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Synchronize_Publication.php (modified) (2 diffs)
-
tags/1.174.0/includes/Modules/Search_Console/Email_Reporting/Report_Data_Builder.php (modified) (1 diff)
-
tags/1.174.0/includes/Modules/Sign_In_With_Google.php (modified) (1 diff)
-
tags/1.174.0/includes/Plugin.php (modified) (3 diffs)
-
tags/1.174.0/includes/loader.php (modified) (1 diff)
-
tags/1.174.0/includes/vendor/composer/autoload_classmap.php (modified) (4 diffs)
-
tags/1.174.0/readme.txt (modified) (2 diffs)
-
trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json (modified) (1 diff)
-
trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json (modified) (1 diff)
-
trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json (modified) (1 diff)
-
trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json (modified) (1 diff)
-
trunk/dist/assets/blocks/sign-in-with-google/block.json (modified) (3 diffs)
-
trunk/dist/assets/blocks/sign-in-with-google/v3/block.json (modified) (1 diff)
-
trunk/dist/assets/css/googlesitekit-admin-css-b0a55e41cd054885c01d.min.css (added)
-
trunk/dist/assets/css/googlesitekit-admin-css-d9aa9ae0497bce9f2e2b.min.css (deleted)
-
trunk/dist/assets/js/googlesitekit-activation-33cfec7e5d5ce1d52c84.js (added)
-
trunk/dist/assets/js/googlesitekit-activation-a18418b23eed5131e342.js (deleted)
-
trunk/dist/assets/js/googlesitekit-ad-blocking-recovery-781b5e4c086bb56009ee.js (added)
-
trunk/dist/assets/js/googlesitekit-ad-blocking-recovery-b2c14915cb4d745197eb.js (deleted)
-
trunk/dist/assets/js/googlesitekit-admin-pointers-tracking-aaf3edcbdbcc6193ae8f.js (added)
-
trunk/dist/assets/js/googlesitekit-admin-pointers-tracking-c845ba1cde77a0f3bc14.js (deleted)
-
trunk/dist/assets/js/googlesitekit-adminbar-8b23f8ec0b9885d93b72.js (deleted)
-
trunk/dist/assets/js/googlesitekit-adminbar-edc2347b3d5db1c50fe9.js (added)
-
trunk/dist/assets/js/googlesitekit-api-1b42ccd8014a64002e13.js (deleted)
-
trunk/dist/assets/js/googlesitekit-api-6b742f1f3e956905b33c.js (added)
-
trunk/dist/assets/js/googlesitekit-block-tracking-15a11a002738d55d094b.js (added)
-
trunk/dist/assets/js/googlesitekit-block-tracking-562fd213268d8cb25f04.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-forms-5c9a265fe07db133d11e.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-forms-75b32a3db427355b3d54.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-site-0ad3830862d5da40c7cc.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-site-d81d1d7e77fb878db074.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-ui-6ae38e48c7d1c550209c.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-ui-aae8b190894508c436a3.js (deleted)
-
trunk/dist/assets/js/googlesitekit-datastore-user-50662a4a25e8662f50d2.js (added)
-
trunk/dist/assets/js/googlesitekit-datastore-user-ee3b9189c8a41f17a304.js (deleted)
-
trunk/dist/assets/js/googlesitekit-entity-dashboard-50d1fe8d423ac6604e9a.js (added)
-
trunk/dist/assets/js/googlesitekit-entity-dashboard-b61e170cdb6b569e03bb.js (deleted)
-
trunk/dist/assets/js/googlesitekit-key-metrics-setup-acc873033a51c241703a.js (added)
-
trunk/dist/assets/js/googlesitekit-key-metrics-setup-f327cd289672fb9d8d5c.js (deleted)
-
trunk/dist/assets/js/googlesitekit-main-dashboard-0712bc98382fa42245ba.js (added)
-
trunk/dist/assets/js/googlesitekit-main-dashboard-4385a32f5ff0102cb3d2.js (deleted)
-
trunk/dist/assets/js/googlesitekit-metric-selection-878a437e42477c6d1739.js (added)
-
trunk/dist/assets/js/googlesitekit-metric-selection-c09232a39f84c396a99f.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-019df226afc930fb7baa.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-ads-87ff0f042c3f8bb75ffe.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-ads-f2cd5b1ca68cdc0afafc.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-adsense-caf75cf03cc3f65ad722.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-adsense-da3acba40b247879cea2.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-analytics-4-08baceaf34b9dc342006.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-analytics-4-6c316f95903d72619464.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-ec132025723e115c493e.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-pagespeed-insights-6460d6ee27011faeb822.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-pagespeed-insights-e61b3aaa46e17ebf457f.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-reader-revenue-manager-28b1f326a7af16311546.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-reader-revenue-manager-35a4e97b0acf40878735.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-search-console-42651fba89fd889cbbe8.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-search-console-878bb1ae8fdd94ea3668.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-sign-in-with-google-99767d36de8ec7cc6fd9.js (deleted)
-
trunk/dist/assets/js/googlesitekit-modules-sign-in-with-google-aa284c1fba6c038e71ff.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-tagmanager-c24942280b3785810fd1.js (added)
-
trunk/dist/assets/js/googlesitekit-modules-tagmanager-d3dc9c4311dfd79986ce.js (deleted)
-
trunk/dist/assets/js/googlesitekit-notifications-aa32e0cf3becd3087d95.js (deleted)
-
trunk/dist/assets/js/googlesitekit-notifications-d97f80ea7c9788e8616a.js (added)
-
trunk/dist/assets/js/googlesitekit-settings-244369c6fd856ce6cdf5.js (added)
-
trunk/dist/assets/js/googlesitekit-settings-83ebe6d5a541de36c404.js (deleted)
-
trunk/dist/assets/js/googlesitekit-splash-46fa2e595d002163ed1b.js (deleted)
-
trunk/dist/assets/js/googlesitekit-splash-f26e7cde106af6278046.js (added)
-
trunk/dist/assets/js/googlesitekit-user-input-ace5668810c71164dfe0.js (added)
-
trunk/dist/assets/js/googlesitekit-user-input-c6ffcdff35f0c900e28b.js (deleted)
-
trunk/dist/assets/js/googlesitekit-widgets-291ae05540f5ce1d4b5f.js (added)
-
trunk/dist/assets/js/googlesitekit-widgets-c56d4ffc3e0d41ad8632.js (deleted)
-
trunk/dist/assets/js/googlesitekit-wp-dashboard-a5d6a1d4bf8a176fcac7.js (deleted)
-
trunk/dist/assets/js/googlesitekit-wp-dashboard-eec86376ce895eb5422a.js (added)
-
trunk/dist/config.php (modified) (1 diff)
-
trunk/dist/manifest.php (modified) (1 diff)
-
trunk/google-site-kit.php (modified) (2 diffs)
-
trunk/includes/Context.php (modified) (1 diff)
-
trunk/includes/Core/Admin/Screens.php (modified) (4 diffs)
-
trunk/includes/Core/Assets/Script.php (modified) (1 diff)
-
trunk/includes/Core/Authentication/Authentication.php (modified) (3 diffs)
-
trunk/includes/Core/Authentication/Clients/Client_Factory.php (modified) (1 diff)
-
trunk/includes/Core/Authentication/Disconnected_Reason.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Body_Content_Map.php (deleted)
-
trunk/includes/Core/Email_Reporting/Content_Map.php (added)
-
trunk/includes/Core/Email_Reporting/Eligible_Subscribers_Query.php (modified) (2 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Assets.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Email_Log.php (modified) (4 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Log_Batch_Query.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Email_Log_Processor.php (modified) (3 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Report_Sender.php (modified) (5 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Reporting.php (modified) (8 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Reporting_Data_Requests.php (modified) (4 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Reporting_Golink_Handler.php (added)
-
trunk/includes/Core/Email_Reporting/Email_Reporting_Pointer.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Email_Template_Formatter.php (modified) (8 diffs)
-
trunk/includes/Core/Email_Reporting/Email_Template_Renderer.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/Email_Template_Renderer_Factory.php (modified) (3 diffs)
-
trunk/includes/Core/Email_Reporting/Initiator_Task.php (modified) (3 diffs)
-
trunk/includes/Core/Email_Reporting/Plain_Text_Formatter.php (modified) (3 diffs)
-
trunk/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php (modified) (8 diffs)
-
trunk/includes/Core/Email_Reporting/Sections_Map.php (modified) (7 diffs)
-
trunk/includes/Core/Email_Reporting/Subscription_Confirmation_Task.php (added)
-
trunk/includes/Core/Email_Reporting/templates/email-report/parts/header.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions-metric-part.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php (modified) (1 diff)
-
trunk/includes/Core/Email_Reporting/templates/email-report/template.php (modified) (2 diffs)
-
trunk/includes/Core/Email_Reporting/templates/error-email (added)
-
trunk/includes/Core/Email_Reporting/templates/error-email/parts (added)
-
trunk/includes/Core/Email_Reporting/templates/error-email/parts/content.php (added)
-
trunk/includes/Core/Email_Reporting/templates/error-email/parts/header.php (added)
-
trunk/includes/Core/Email_Reporting/templates/error-email/template.php (added)
-
trunk/includes/Core/Email_Reporting/templates/invitation-email/template.php (modified) (2 diffs)
-
trunk/includes/Core/Email_Reporting/templates/subscription-confirmation/parts/content.php (modified) (2 diffs)
-
trunk/includes/Core/Email_Reporting/templates/subscription-confirmation/template.php (modified) (2 diffs)
-
trunk/includes/Core/Golinks (added)
-
trunk/includes/Core/Golinks/Dashboard_Golink_Handler.php (added)
-
trunk/includes/Core/Golinks/Golink_Handler_Interface.php (added)
-
trunk/includes/Core/Golinks/Golinks.php (added)
-
trunk/includes/Core/Modules/Module_With_Owner.php (modified) (2 diffs)
-
trunk/includes/Core/Permissions/Permissions.php (modified) (1 diff)
-
trunk/includes/Core/Storage/Encrypted_User_Options.php (modified) (1 diff)
-
trunk/includes/Core/User/Email_Reporting.php (modified) (2 diffs)
-
trunk/includes/Core/User/REST_Email_Reporting_Controller.php (modified) (3 diffs)
-
trunk/includes/Core/User_Input/Site_Specific_Answers.php (modified) (1 diff)
-
trunk/includes/Core/User_Input/User_Specific_Answers.php (modified) (1 diff)
-
trunk/includes/Core/Util/BC_Functions.php (modified) (1 diff)
-
trunk/includes/Core/Util/Entity_Factory.php (modified) (2 diffs)
-
trunk/includes/Core/Util/URL.php (modified) (2 diffs)
-
trunk/includes/Modules/Analytics_4.php (modified) (2 diffs)
-
trunk/includes/Modules/Analytics_4/Audience_Utilities.php (modified) (2 diffs)
-
trunk/includes/Modules/Analytics_4/Synchronize_AdSenseLinked.php (modified) (2 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager.php (modified) (3 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php (modified) (1 diff)
-
trunk/includes/Modules/Reader_Revenue_Manager/Settings.php (modified) (4 diffs)
-
trunk/includes/Modules/Reader_Revenue_Manager/Synchronize_Publication.php (modified) (2 diffs)
-
trunk/includes/Modules/Search_Console/Email_Reporting/Report_Data_Builder.php (modified) (1 diff)
-
trunk/includes/Modules/Sign_In_With_Google.php (modified) (1 diff)
-
trunk/includes/Plugin.php (modified) (3 diffs)
-
trunk/includes/loader.php (modified) (1 diff)
-
trunk/includes/vendor/composer/autoload_classmap.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-site-kit/tags/1.174.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/rrm-contribute-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Contribute with Google", 7 7 "category": "widgets", -
google-site-kit/tags/1.174.0/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/rrm-contribute-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Contribute with Google", 7 7 "category": "widgets", -
google-site-kit/tags/1.174.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/rrm-subscribe-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Subscribe with Google", 7 7 "category": "widgets", -
google-site-kit/tags/1.174.0/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/rrm-subscribe-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Subscribe with Google", 7 7 "category": "widgets", -
google-site-kit/tags/1.174.0/dist/assets/blocks/sign-in-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/sign-in-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Sign in with Google", 7 7 "category": "widgets", … … 12 12 "shape": { 13 13 "type": "string", 14 "enum": [ "", "rectangular", "pill"]14 "enum": [ "", "rectangular", "pill" ] 15 15 }, 16 16 "text": { … … 26 26 "theme": { 27 27 "type": "string", 28 "enum": [ "", "outline", "filled_blue", "filled_black"]28 "enum": [ "", "outline", "filled_blue", "filled_black" ] 29 29 }, 30 30 "buttonClassName": { -
google-site-kit/tags/1.174.0/dist/assets/blocks/sign-in-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/sign-in-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Sign in with Google", 7 7 "category": "widgets", -
google-site-kit/tags/1.174.0/dist/config.php
r3457523 r3479192 8 8 9 9 return array( 10 'features' => array( 'googleTagGateway','gtagUserData','privacySandboxModule','proactiveUserEngagement',' rrmPolicyViolations','setupFlowRefresh' ),10 'features' => array( 'googleTagGateway','gtagUserData','privacySandboxModule','proactiveUserEngagement','setupFlowRefresh' ), 11 11 ); -
google-site-kit/tags/1.174.0/dist/manifest.php
r3467940 r3479192 28 28 'sign-in-with-google/index' => array( "sign-in-with-google/index.js", null ), 29 29 'sign-in-with-google/editor-styles' => array( "sign-in-with-google/editor-styles.js", null ), 30 'googlesitekit-admin-css' => array( "googlesitekit-admin-css- d9aa9ae0497bce9f2e2b.min.css", null ),30 'googlesitekit-admin-css' => array( "googlesitekit-admin-css-b0a55e41cd054885c01d.min.css", null ), 31 31 'googlesitekit-adminbar-css' => array( "googlesitekit-adminbar-css-da31a8a65334682e590b.min.css", null ), 32 32 'googlesitekit-wp-dashboard-css' => array( "googlesitekit-wp-dashboard-css-ff8420adbc8b86a5776c.min.css", null ), 33 33 'googlesitekit-authorize-application-css' => array( "googlesitekit-authorize-application-css-5b98b536e7f34c6411c1.min.css", null ), 34 'googlesitekit-api' => array( "googlesitekit-api- 1b42ccd8014a64002e13.js", null ),34 'googlesitekit-api' => array( "googlesitekit-api-6b742f1f3e956905b33c.js", null ), 35 35 'googlesitekit-data' => array( "googlesitekit-data-ab56c0ab3c6231462584.js", null ), 36 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site- 0ad3830862d5da40c7cc.js", null ),37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user- ee3b9189c8a41f17a304.js", null ),38 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms- 5c9a265fe07db133d11e.js", null ),36 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site-d81d1d7e77fb878db074.js", null ), 37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user-50662a4a25e8662f50d2.js", null ), 38 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms-75b32a3db427355b3d54.js", null ), 39 39 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location-6671f1e766c63f15d64f.js", null ), 40 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui- aae8b190894508c436a3.js", null ),41 'googlesitekit-modules' => array( "googlesitekit-modules- ec132025723e115c493e.js", null ),42 'googlesitekit-notifications' => array( "googlesitekit-notifications- aa32e0cf3becd3087d95.js", null ),43 'googlesitekit-widgets' => array( "googlesitekit-widgets- c56d4ffc3e0d41ad8632.js", null ),44 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads- f2cd5b1ca68cdc0afafc.js", null ),45 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense- caf75cf03cc3f65ad722.js", null ),46 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4- 08baceaf34b9dc342006.js", null ),47 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights- 6460d6ee27011faeb822.js", null ),48 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager- 35a4e97b0acf40878735.js", null ),49 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console- 878bb1ae8fdd94ea3668.js", null ),50 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google- 99767d36de8ec7cc6fd9.js", null ),51 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager- d3dc9c4311dfd79986ce.js", null ),52 'googlesitekit-user-input' => array( "googlesitekit-user-input- c6ffcdff35f0c900e28b.js", null ),53 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery- b2c14915cb4d745197eb.js", null ),54 'googlesitekit-block-tracking' => array( "googlesitekit-block-tracking- 562fd213268d8cb25f04.js", null ),40 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui-6ae38e48c7d1c550209c.js", null ), 41 'googlesitekit-modules' => array( "googlesitekit-modules-019df226afc930fb7baa.js", null ), 42 'googlesitekit-notifications' => array( "googlesitekit-notifications-d97f80ea7c9788e8616a.js", null ), 43 'googlesitekit-widgets' => array( "googlesitekit-widgets-291ae05540f5ce1d4b5f.js", null ), 44 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-87ff0f042c3f8bb75ffe.js", null ), 45 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense-da3acba40b247879cea2.js", null ), 46 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-6c316f95903d72619464.js", null ), 47 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights-e61b3aaa46e17ebf457f.js", null ), 48 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager-28b1f326a7af16311546.js", null ), 49 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console-42651fba89fd889cbbe8.js", null ), 50 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-aa284c1fba6c038e71ff.js", null ), 51 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager-c24942280b3785810fd1.js", null ), 52 'googlesitekit-user-input' => array( "googlesitekit-user-input-ace5668810c71164dfe0.js", null ), 53 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery-781b5e4c086bb56009ee.js", null ), 54 'googlesitekit-block-tracking' => array( "googlesitekit-block-tracking-15a11a002738d55d094b.js", null ), 55 55 'googlesitekit-polyfills' => array( "googlesitekit-polyfills-f2726df5859ebd38706b.js", null ), 56 56 'googlesitekit-components' => array( "googlesitekit-components-1288bf8a9eda8d2eaa36.js", null ), 57 'googlesitekit-metric-selection' => array( "googlesitekit-metric-selection- c09232a39f84c396a99f.js", null ),58 'googlesitekit-key-metrics-setup' => array( "googlesitekit-key-metrics-setup- f327cd289672fb9d8d5c.js", null ),59 'googlesitekit-activation' => array( "googlesitekit-activation- a18418b23eed5131e342.js", null ),60 'googlesitekit-adminbar' => array( "googlesitekit-adminbar- 8b23f8ec0b9885d93b72.js", null ),61 'googlesitekit-admin-pointers-tracking' => array( "googlesitekit-admin-pointers-tracking- c845ba1cde77a0f3bc14.js", null ),62 'googlesitekit-settings' => array( "googlesitekit-settings- 83ebe6d5a541de36c404.js", null ),63 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard- 4385a32f5ff0102cb3d2.js", null ),64 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard- b61e170cdb6b569e03bb.js", null ),65 'googlesitekit-splash' => array( "googlesitekit-splash- 46fa2e595d002163ed1b.js", null ),66 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard- a5d6a1d4bf8a176fcac7.js", null ),57 'googlesitekit-metric-selection' => array( "googlesitekit-metric-selection-878a437e42477c6d1739.js", null ), 58 'googlesitekit-key-metrics-setup' => array( "googlesitekit-key-metrics-setup-acc873033a51c241703a.js", null ), 59 'googlesitekit-activation' => array( "googlesitekit-activation-33cfec7e5d5ce1d52c84.js", null ), 60 'googlesitekit-adminbar' => array( "googlesitekit-adminbar-edc2347b3d5db1c50fe9.js", null ), 61 'googlesitekit-admin-pointers-tracking' => array( "googlesitekit-admin-pointers-tracking-aaf3edcbdbcc6193ae8f.js", null ), 62 'googlesitekit-settings' => array( "googlesitekit-settings-244369c6fd856ce6cdf5.js", null ), 63 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard-0712bc98382fa42245ba.js", null ), 64 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard-50d1fe8d423ac6604e9a.js", null ), 65 'googlesitekit-splash' => array( "googlesitekit-splash-f26e7cde106af6278046.js", null ), 66 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard-eec86376ce895eb5422a.js", null ), 67 67 'googlesitekit-runtime' => array( "runtime-4b2eb8d81a08b104395a.js", null ), 68 68 'googlesitekit-vendor' => array( "googlesitekit-vendor-568c1105b8e4f20eff16.js", null ), -
google-site-kit/tags/1.174.0/google-site-kit.php
r3467940 r3479192 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.17 3.014 * Version: 1.174.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.17 3.0' );29 define( 'GOOGLESITEKIT_VERSION', '1.174.0' ); 30 30 define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ ); 31 define( 'GOOGLESITEKIT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 32 define( 'GOOGLESITEKIT_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) ); 31 33 define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' ); 32 34 define( 'GOOGLESITEKIT_WP_MINIMUM', '5.2.0' ); -
google-site-kit/tags/1.174.0/includes/Context.php
r3349867 r3479192 379 379 // If recent version, we can properly detect the mode. 380 380 if ( $amp_plugin_version_2_or_higher ) { 381 $mode = AMP_Options_Manager::get_option( 'theme_support' ); 381 $mode = AMP_Options_Manager::get_option( 'theme_support' ); // @phpstan-ignore class.notFound 382 382 } else { 383 383 $mode = AMP_Theme_Support::get_support_mode(); -
google-site-kit/tags/1.174.0/includes/Core/Admin/Screens.php
r3407206 r3479192 190 190 $dashboard_index = array_search( 'index.php', $menu_order, true ); 191 191 192 $sitekit_index = false; 192 if ( false === $dashboard_index ) { 193 return $menu_order; 194 } 195 193 196 foreach ( $menu_order as $key => $value ) { 194 197 if ( strpos( $value, self::PREFIX ) === 0 ) { 195 $sitekit_index = $key;196 $sitekit_value = $value;198 unset( $menu_order[ $key ] ); 199 array_splice( $menu_order, $dashboard_index + 1, 0, $value ); 197 200 break; 198 201 } 199 202 } 200 203 201 if ( false === $dashboard_index || false === $sitekit_index ) {202 return $menu_order;203 }204 unset( $menu_order[ $sitekit_index ] );205 array_splice( $menu_order, $dashboard_index + 1, 0, $sitekit_value );206 204 return $menu_order; 207 205 } … … 293 291 294 292 if ( current_user_can( Permissions::VIEW_SPLASH ) ) { 293 $notification = $this->context->input()->filter( INPUT_GET, 'notification' ); 294 $panel = $this->context->input()->filter( INPUT_GET, 'panel' ); 295 295 296 wp_safe_redirect( 296 $this->context->admin_url( 'splash' ) 297 $this->context->admin_url( 298 'splash', 299 array_filter( 300 array( 301 'notification' => $notification, 302 'panel' => $panel, 303 ), 304 function ( $value ) { 305 return null !== $value && '' !== $value; 306 } 307 ) 308 ) 297 309 ); 298 310 exit; … … 317 329 318 330 if ( current_user_can( Permissions::VIEW_DASHBOARD ) ) { 331 $notification = $this->context->input()->filter( INPUT_GET, 'notification' ); 332 $panel = $this->context->input()->filter( INPUT_GET, 'panel' ); 333 319 334 wp_safe_redirect( 320 $this->context->admin_url() 335 $this->context->admin_url( 336 'dashboard', 337 array_filter( 338 array( 339 'notification' => $notification, 340 'panel' => $panel, 341 ), 342 function ( $value ) { 343 return null !== $value && '' !== $value; 344 } 345 ) 346 ) 321 347 ); 322 348 exit; … … 507 533 $context->admin_url( 508 534 'dashboard', 509 array( 510 // Pass through the notification parameter, or removes it if none. 511 'notification' => $context->input()->filter( INPUT_GET, 'notification' ), 535 array_filter( 536 array( 537 // Pass through supported params, or remove if none. 538 'notification' => $context->input()->filter( INPUT_GET, 'notification' ), 539 'panel' => $context->input()->filter( INPUT_GET, 'panel' ), 540 ), 541 function ( $value ) { 542 return null !== $value && '' !== $value; 543 } 512 544 ) 513 545 ) -
google-site-kit/tags/1.174.0/includes/Core/Assets/Script.php
r3118692 r3479192 71 71 if ( $src ) { 72 72 $entry = Manifest::get( $this->handle ); 73 74 list( $filename, $hash ) = array( null, null ); 73 75 74 76 if ( is_array( $entry[0] ) ) { -
google-site-kit/tags/1.174.0/includes/Core/Authentication/Authentication.php
r3397601 r3479192 313 313 314 314 $this->set_connected_proxy_url(); 315 }, 316 10, 317 3 315 } 318 316 ); 319 317 … … 1145 1143 <a 1146 1144 href="#" 1147 onclick=" clearSiteKitAppStorage()"1145 onclick="reauthenticateAndContinueSetup()" 1148 1146 ><?php esc_html_e( 'Click here', 'google-site-kit' ); ?></a> 1149 1147 </p> … … 1152 1150 sprintf( 1153 1151 " 1154 function clearSiteKitAppStorage() { 1155 if ( localStorage ) { 1156 localStorage.clear(); 1152 function reauthenticateAndContinueSetup() { 1153 const moduleSlug = getAbandonedModuleSlug(); 1154 1155 if ( moduleSlug ) { 1156 const redirect = '%3\$s&slug=' + moduleSlug; 1157 document.location = '%2\$s&redirect=' + encodeURIComponent( redirect ); 1158 } else { 1159 if ( localStorage ) { 1160 localStorage.clear(); 1161 } 1162 if ( sessionStorage ) { 1163 sessionStorage.clear(); 1164 } 1165 document.location = '%2\$s'; 1157 1166 } 1158 if ( sessionStorage ) { 1159 sessionStorage.clear(); 1167 } 1168 1169 function getAbandonedModuleSlug() { 1170 for ( const storage of [ localStorage, sessionStorage ] ) { 1171 if ( ! storage ) { 1172 continue; 1173 } 1174 const key = Object.keys( storage ).find( ( k ) => 1175 k.match( 'googlesitekit_%1\$s_.*_module_setup' ) 1176 ); 1177 if ( ! key ) { 1178 continue; 1179 } 1180 try { 1181 return JSON.parse( storage[ key ] )?.value; 1182 } catch ( _ ) {} 1160 1183 } 1161 document.location = '%s';1162 1184 } 1163 1185 ", 1164 esc_url_raw( $this->get_connect_url() ) 1186 GOOGLESITEKIT_VERSION, 1187 esc_url_raw( $this->get_connect_url() ), 1188 esc_url_raw( 1189 $this->context->admin_url( 1190 'dashboard', 1191 array( 1192 'reAuth' => 'true', 1193 ) 1194 ) 1195 ) 1165 1196 ) 1166 1197 ); -
google-site-kit/tags/1.174.0/includes/Core/Authentication/Clients/Client_Factory.php
r3343017 r3479192 161 161 * @since 1.115.0 162 162 * 163 * @param $force_ip_resolve null|stringIP version to force. Default: null.163 * @param null|string $force_ip_resolve IP version to force. Default: null. 164 164 */ 165 165 $force_ip_resolve = apply_filters( 'googlesitekit_force_ip_resolve', null ); -
google-site-kit/tags/1.174.0/includes/Core/Authentication/Disconnected_Reason.php
r3118692 r3479192 39 39 public function register() { 40 40 parent::register(); 41 add_action( 'googlesitekit_authorize_user', array( $this, 'delete' ) ); 41 // The delete method returns a boolean but actions expect a void return, so we ignore it here. 42 add_action( 'googlesitekit_authorize_user', array( $this, 'delete' ) ); // @phpstan-ignore return.void 42 43 } 43 44 } -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Eligible_Subscribers_Query.php
r3438138 r3479192 123 123 */ 124 124 private function query_shared_roles( $excluded_user_ids ) { 125 $shared_roles = $this->modules->get_module_sharing_settings()->get_all_shared_roles(); 125 $sharing_settings = $this->modules->get_module_sharing_settings(); 126 127 $shared_roles = array_unique( 128 array_merge( 129 $sharing_settings->get_shared_roles( 'analytics-4' ), 130 $sharing_settings->get_shared_roles( 'search-console' ) 131 ) 132 ); 126 133 127 134 if ( empty( $shared_roles ) ) { … … 131 138 $query = new WP_User_Query( 132 139 array( 133 'role__in' => array_values( array_unique( $shared_roles )),140 'role__in' => array_values( $shared_roles ), 134 141 'number' => self::QUERY_LIMIT, 135 142 'count_total' => false, -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Assets.php
r3467940 r3479192 58 58 // subscription-confirmation assets. 59 59 'subscription-envelope-graphic' => '2026-02-20-subscription-envelope-graphic.png', 60 // error-email assets. 61 'warning-icon' => '2026-02-20-warning-icon.png', 60 62 ); 61 63 -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Log.php
r3467940 r3479192 82 82 83 83 /** 84 * Template type meta key. 85 * 86 * @since 1.174.0 87 */ 88 const META_TEMPLATE_TYPE = '_template_type'; 89 90 /** 84 91 * Email log post statuses. 85 92 * … … 91 98 const STATUS_FAILED = 'email_failed'; 92 99 const STATUS_SCHEDULED = 'email_scheduled'; 100 101 /** 102 * Email template types. 103 * 104 * @since 1.174.0 105 */ 106 const TEMPLATE_TYPE_EMAIL_REPORT = 'email-report'; 107 const TEMPLATE_TYPE_SUBSCRIBE_SUCCESS = 'subscribe-success'; 93 108 94 109 /** … … 353 368 ) 354 369 ); 370 371 register_post_meta( 372 self::POST_TYPE, 373 self::META_TEMPLATE_TYPE, 374 array( 375 'type' => 'string', 376 'single' => true, 377 'auth_callback' => $auth_callback, 378 'sanitize_callback' => array( __CLASS__, 'sanitize_template_type' ), 379 ) 380 ); 355 381 } 356 382 … … 483 509 public static function sanitize_site_id( $value ) { 484 510 return absint( $value ); 511 } 512 513 /** 514 * Sanitizes the template type meta value. 515 * 516 * @since 1.174.0 517 * 518 * @param mixed $value Meta value. 519 * @return string Sanitized template type. 520 */ 521 public static function sanitize_template_type( $value ) { 522 $value = sanitize_text_field( $value ); 523 524 $allowed = array( 525 self::TEMPLATE_TYPE_EMAIL_REPORT, 526 self::TEMPLATE_TYPE_SUBSCRIBE_SUCCESS, 527 ); 528 529 if ( in_array( $value, $allowed, true ) ) { 530 return $value; 531 } 532 533 return self::TEMPLATE_TYPE_EMAIL_REPORT; 485 534 } 486 535 -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Log_Batch_Query.php
r3467940 r3479192 310 310 } 311 311 312 return get_post_meta( $batch_post_ids[0], Email_Log::META_ERROR_DETAILS, true ); 312 $first_post_id = min( $batch_post_ids ); 313 return get_post_meta( $first_post_id, Email_Log::META_ERROR_DETAILS, true ); 313 314 } 314 315 } -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Log_Processor.php
r3457523 r3479192 102 102 } 103 103 104 $template_type = $this->get_template_type_from_log( $email_log ); 105 106 if ( Email_Log::TEMPLATE_TYPE_SUBSCRIBE_SUCCESS === $template_type ) { 107 $this->process_subscription_confirmation_log( $post_id, $user, $frequency ); 108 return; 109 } 110 104 111 $date_range = $this->get_date_range_for_log( $email_log ); 105 112 if ( is_wp_error( $date_range ) ) { … … 143 150 144 151 /** 152 * Processes a subscription confirmation log. 153 * 154 * @since 1.174.0 155 * 156 * @param int $post_id Email log post ID. 157 * @param WP_User $user Recipient user. 158 * @param string $frequency Frequency slug. 159 */ 160 private function process_subscription_confirmation_log( $post_id, WP_User $user, $frequency ) { 161 $template_data = $this->template_formatter->prepare_subscription_confirmation_template_data( $frequency ); 162 163 $send_result = $this->report_sender->send( 164 $user, 165 array(), 166 $template_data, 167 'subscription-confirmation' 168 ); 169 170 if ( is_wp_error( $send_result ) ) { 171 $this->mark_failed( $post_id, $send_result ); 172 return; 173 } 174 175 $this->mark_sent( $post_id ); 176 } 177 178 /** 145 179 * Retrieves a valid email log post. 146 180 * … … 162 196 163 197 return $email_log; 198 } 199 200 /** 201 * Gets the template type for an email log. 202 * 203 * @since 1.174.0 204 * 205 * @param WP_Post $email_log Email log post. 206 * @return string Template type. 207 */ 208 private function get_template_type_from_log( WP_Post $email_log ) { 209 $template_type = get_post_meta( $email_log->ID, Email_Log::META_TEMPLATE_TYPE, true ); 210 211 return Email_Log::sanitize_template_type( $template_type ); 164 212 } 165 213 -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Report_Sender.php
r3457523 r3479192 64 64 * @param array $sections_payload Sections payload. 65 65 * @param array $template_data Template data. 66 * @param string $template_name Optional. Template name. Default Email_Log::TEMPLATE_TYPE_EMAIL_REPORT. 66 67 * @return true|WP_Error True on success, WP_Error on failure. 67 68 */ 68 public function send( WP_User $user, $sections_payload, $template_data ) {69 public function send( WP_User $user, $sections_payload, $template_data, $template_name = Email_Log::TEMPLATE_TYPE_EMAIL_REPORT ) { 69 70 $renderer = $this->template_renderer_factory->create( $sections_payload ); 70 71 … … 73 74 } 74 75 75 $html_content = $this->render_template( $renderer, $template_data );76 $html_content = $this->render_template( $renderer, $template_data, $template_name ); 76 77 77 78 if ( is_wp_error( $html_content ) ) { … … 79 80 } 80 81 81 $text_content = $this->render_text_template( $renderer, $template_data );82 $text_content = $this->render_text_template( $renderer, $template_data, $template_name ); 82 83 83 84 if ( is_wp_error( $text_content ) ) { … … 113 114 * @param Email_Template_Renderer $renderer Template renderer instance. 114 115 * @param array $template_data Template data. 116 * @param string $template_name Template name. 115 117 * @return string|WP_Error Rendered HTML or WP_Error. 116 118 */ 117 private function render_template( Email_Template_Renderer $renderer, $template_data ) {118 $rendered = $renderer->render( 'email-report', $template_data );119 private function render_template( Email_Template_Renderer $renderer, $template_data, $template_name ) { 120 $rendered = $renderer->render( $template_name, $template_data ); 119 121 120 122 if ( is_wp_error( $rendered ) ) { … … 136 138 * @param Email_Template_Renderer $renderer Template renderer instance. 137 139 * @param array $template_data Template data. 140 * @param string $template_name Template name. 138 141 * @return string|WP_Error Rendered plain text or WP_Error. 139 142 */ 140 private function render_text_template( Email_Template_Renderer $renderer, $template_data ) {141 $rendered = $renderer->render_text( 'email-report', $template_data );143 private function render_text_template( Email_Template_Renderer $renderer, $template_data, $template_name ) { 144 $rendered = $renderer->render_text( $template_name, $template_data ); 142 145 143 146 if ( is_wp_error( $rendered ) ) { -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting.php
r3467940 r3479192 14 14 use Google\Site_Kit\Core\Email\Email; 15 15 use Google\Site_Kit\Core\Authentication\Authentication; 16 use Google\Site_Kit\Core\Golinks\Golinks; 16 17 use Google\Site_Kit\Core\Modules\Modules; 17 18 use Google\Site_Kit\Core\Storage\Options; … … 66 67 67 68 /** 69 * Golinks instance. 70 * 71 * @since 1.174.0 72 * @var Golinks 73 */ 74 protected $golinks; 75 76 /** 68 77 * Email_Reporting_Settings instance. 69 78 * … … 182 191 * @since 1.162.0 183 192 * @since 1.168.0 Added authentication dependency. 193 * @since 1.174.0 Added golinks dependency. 184 194 * 185 195 * @param Context $context Plugin context. 186 196 * @param Modules $modules Modules instance. 187 197 * @param Email_Reporting_Data_Requests $data_requests Email reporting data requests. 198 * @param Golinks $golinks Golinks instance. 188 199 * @param Authentication $authentication Authentication instance. 189 200 * @param Options|null $options Optional. Options instance. Default is a new instance. … … 194 205 Modules $modules, 195 206 Email_Reporting_Data_Requests $data_requests, 207 Golinks $golinks, 196 208 Authentication $authentication, 197 209 ?Options $options = null, … … 201 213 $this->modules = $modules; 202 214 $this->data_requests = $data_requests; 215 $this->golinks = $golinks; 203 216 $this->authentication = $authentication; 204 217 $this->options = $options ?: new Options( $this->context ); … … 214 227 $email_sender = new Email(); 215 228 $section_builder = new Email_Report_Section_Builder( $this->context ); 216 $template_formatter = new Email_Template_Formatter( $this->context, $section_builder );217 $template_renderer_factory = new Email_Template_Renderer_Factory( $this->context );229 $template_formatter = new Email_Template_Formatter( $this->context, $section_builder, $this->golinks ); 230 $template_renderer_factory = new Email_Template_Renderer_Factory( $this->context, $this->golinks ); 218 231 $report_sender = new Email_Report_Sender( $template_renderer_factory, $email_sender ); 219 232 $log_processor = new Email_Log_Processor( $this->email_log_batch_query, $this->data_requests, $template_formatter, $report_sender ); … … 224 237 $this->user_settings, 225 238 $eligible_subscribers_query, 226 $email_sender 239 $email_sender, 240 $this->golinks 227 241 ); 228 $this->email_log = new Email_Log( $this->context);242 $this->email_log = new Email_Log(); 229 243 $this->scheduler = new Email_Reporting_Scheduler( $frequency_planner ); 230 244 $this->initiator_task = new Initiator_Task( $this->scheduler, $this->subscribed_users_query ); … … 247 261 */ 248 262 public function register() { 263 $this->golinks->register_handler( 'manage-subscription-email-reporting', new Email_Reporting_Golink_Handler() ); 249 264 $this->settings->register(); 250 265 $this->rest_controller->register(); -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Data_Requests.php
r3457523 r3479192 38 38 class Email_Reporting_Data_Requests { 39 39 40 const PERMISSIONS_ERROR_STATUSES = array( 401, 403 ); 41 42 const PERMISSIONS_ERROR_REASONS = array( 43 'unauthorized', 44 'authError', 45 'expired', 46 'required', 47 'forbidden', 48 'insufficientPermissions', 49 'accountDeleted', 50 'accountDisabled', 51 'accessNotConfigured', 52 ); 53 40 54 /** 41 55 * Modules instance. … … 175 189 176 190 /** 191 * Categorizes a WP_Error based on its status and reason for better messaging in the front end. 192 * 193 * @since 1.174.0 194 * 195 * @param WP_Error $error The error to categorize. 196 * @param string $module_slug The module slug related to the error. 197 * @return WP_Error The categorized error with an added 'category' data field. 198 */ 199 public function categorize_error( WP_Error $error, $module_slug ) { 200 $status = $error->get_error_data()['status']; 201 $reason = $error->get_error_data()['reason']; 202 203 $category = 'report_error'; 204 if ( in_array( $status, self::PERMISSIONS_ERROR_STATUSES, true ) || in_array( $reason, self::PERMISSIONS_ERROR_REASONS, true ) ) { 205 $category = 'permissions_error'; 206 } 207 208 return new WP_Error( 209 $error->get_error_code(), 210 $error->get_error_message(), 211 array_merge( 212 $error->get_error_data(), 213 array( 214 'category_id' => $category, 215 'module_slug' => $module_slug, 216 ) 217 ) 218 ); 219 } 220 221 /** 177 222 * Gets active module slugs for email reporting. 178 223 * … … 204 249 205 250 if ( is_wp_error( $shared_payload ) ) { 206 return $ shared_payload;251 return $this->categorize_error( $shared_payload, $slug ); 207 252 } 208 253 … … 223 268 224 269 if ( is_wp_error( $result ) ) { 225 return $ result;270 return $this->categorize_error( $result, $slug ); 226 271 } 227 272 -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Pointer.php
r3457523 r3479192 176 176 'buttons' => sprintf( 177 177 '<a class="googlesitekit-pointer-cta button-primary" data-action="dismiss" href="%s">%s</a>', 178 $this->context->admin_url( 'dashboard', array( ' email-reporting-panel' => 1) ),178 $this->context->admin_url( 'dashboard', array( 'panel' => 'email-reporting' ) ), 179 179 esc_html__( 'Set up', 'google-site-kit' ) 180 180 ), -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php
r3420533 r3479192 164 164 165 165 /** 166 * Schedules subscription confirmation delivery via existing worker and fallback pipeline. 167 * 168 * @since 1.174.0 169 * 170 * @param int $user_id User ID. 171 * @param array $previous_settings Previous settings. 172 * @param array $updated_settings Updated settings. 173 * @return true|\WP_Error True on success, WP_Error on failure. 174 */ 175 public function schedule_email_confirmation( $user_id, array $previous_settings, array $updated_settings ) { 176 $task = new Subscription_Confirmation_Task( $this->frequency_planner ); 177 $batch = $task->maybe_schedule( 178 $user_id, 179 $previous_settings, 180 $updated_settings 181 ); 182 183 if ( false === $batch ) { 184 return true; 185 } 186 187 if ( is_wp_error( $batch ) ) { 188 return $batch; 189 } 190 191 if ( empty( $batch['batch_id'] ) || empty( $batch['frequency'] ) || ! isset( $batch['timestamp'] ) ) { 192 return new \WP_Error( 193 'email_reporting_invalid_confirmation_batch', 194 __( 'Subscription confirmation batch payload is invalid.', 'google-site-kit' ), 195 array( 'status' => 500 ) 196 ); 197 } 198 199 $batch_id = (string) $batch['batch_id']; 200 $frequency = (string) $batch['frequency']; 201 $timestamp = (int) $batch['timestamp']; 202 203 $this->schedule_worker( $batch_id, $frequency, $timestamp, 0 ); 204 $this->schedule_fallback( $batch_id, $frequency, $timestamp, 0 ); 205 206 return true; 207 } 208 209 /** 166 210 * Unschedules all email reporting related events. 167 211 * -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Formatter.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 use Google\Site_Kit\Core\User\Email_Reporting_Settings; 15 16 use WP_Error; … … 45 46 46 47 /** 48 * Golinks instance. 49 * 50 * @since 1.174.0 51 * 52 * @var Golinks 53 */ 54 private $golinks; 55 56 /** 47 57 * Constructor. 48 58 * 49 59 * @since 1.170.0 60 * @since 1.174.0 Added golinks dependency. 50 61 * 51 62 * @param Context $context Plugin context. 52 63 * @param Email_Report_Section_Builder $section_builder Section builder instance. 53 */ 54 public function __construct( Context $context, Email_Report_Section_Builder $section_builder ) { 64 * @param Golinks $golinks Golinks instance. 65 */ 66 public function __construct( Context $context, Email_Report_Section_Builder $section_builder, Golinks $golinks ) { 55 67 $this->context = $context; 56 68 $this->section_builder = $section_builder; 69 $this->golinks = $golinks; 57 70 } 58 71 … … 123 136 } 124 137 125 $sections_map = new Sections_Map( $this->context, $sections_payload );138 $sections_map = new Sections_Map( $this->context, $sections_payload, $this->golinks ); 126 139 if ( empty( $sections_map->get_sections() ) ) { 127 140 return new WP_Error( … … 299 312 */ 300 313 public function prepare_simple_email_data( $subject, $preheader, $email_data = array() ) { 301 $site_domain = $this->get_site_domain(); 314 $site_domain = $this->get_site_domain(); 315 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 316 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 317 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 302 318 303 319 $data = array( … … 311 327 'primary_call_to_action' => array( 312 328 'label' => $email_data['cta_label'] ?? __( 'Get your report', 'google-site-kit' ), 313 'url' => $email_data['cta_url'] ?? admin_url( 'admin.php?page=googlesitekit-dashboard' ),329 'url' => $email_data['cta_url'] ?? $dashboard_url, 314 330 ), 315 331 'footer' => array( 316 'copy' => $email_data['footer_copy'] ?? '', 332 'copy' => $email_data['footer_copy'] ?? '', 333 'unsubscribe_url' => $email_settings_url, 334 'links' => array( 335 array( 336 'label' => __( 'Manage subscription', 'google-site-kit' ), 337 'url' => $email_settings_url, 338 ), 339 array( 340 'label' => __( 'Privacy Policy', 'google-site-kit' ), 341 'url' => 'https://policies.google.com/privacy', 342 ), 343 array( 344 'label' => __( 'Help center', 'google-site-kit' ), 345 'url' => $help_center_url, 346 ), 347 ), 317 348 ), 318 349 ); 319 350 320 351 return $data; 352 } 353 354 /** 355 * Builds template data for the subscription confirmation email. 356 * 357 * @since 1.174.0 358 * 359 * @param string $frequency Frequency slug. 360 * @return array Template data. 361 */ 362 public function prepare_subscription_confirmation_template_data( $frequency ) { 363 $site_domain = $this->get_site_domain(); 364 $frequency_label = $this->get_frequency_label( $frequency ); 365 $first_report_date = $this->get_first_report_date_label( $frequency ); 366 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 367 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 368 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 369 370 return array( 371 'subject' => sprintf( 372 /* translators: %s: Site domain. */ 373 __( 'Success! You’re subscribed to Site Kit reports for %s', 'google-site-kit' ), 374 $site_domain 375 ), 376 'preheader' => __( 'Your subscription is confirmed and your first report is on the way.', 'google-site-kit' ), 377 'site' => array( 378 'domain' => $site_domain, 379 'url' => $this->context->get_reference_site_url(), 380 ), 381 'title' => Content_Map::get_title( 'subscription-confirmation' ), 382 'body' => Content_Map::get_body_with_args( 383 'subscription-confirmation', 384 array( 385 $frequency_label, 386 $first_report_date, 387 ) 388 ), 389 'learn_more_url' => 'https://sitekit.withgoogle.com/documentation/email-reports/', 390 'primary_call_to_action' => array( 391 'label' => __( 'View dashboard', 'google-site-kit' ), 392 'url' => $dashboard_url, 393 ), 394 'footer' => array( 395 'copy' => __( 'You received this email because you signed up to receive email reports from Site Kit. If you do not want to receive these emails in the future you can unsubscribe', 'google-site-kit' ), 396 'unsubscribe_url' => $email_settings_url, 397 'links' => array( 398 array( 399 'label' => __( 'Manage subscription', 'google-site-kit' ), 400 'url' => $email_settings_url, 401 ), 402 array( 403 'label' => __( 'Privacy Policy', 'google-site-kit' ), 404 'url' => 'https://policies.google.com/privacy', 405 ), 406 array( 407 'label' => __( 'Help center', 'google-site-kit' ), 408 'url' => $help_center_url, 409 ), 410 ), 411 ), 412 ); 321 413 } 322 414 … … 331 423 */ 332 424 private function prepare_template_data( $frequency, $date_range ) { 425 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 426 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 427 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 428 333 429 return array( 334 430 'subject' => $this->build_subject( $frequency ), … … 344 440 'primary_call_to_action' => array( 345 441 'label' => __( 'View dashboard', 'google-site-kit' ), 346 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard' ),442 'url' => $dashboard_url, 347 443 ), 348 444 'footer' => array( 349 445 'copy' => __( 'You received this email because you signed up to receive email reports from Site Kit. If you do not want to receive these emails in the future you can unsubscribe', 'google-site-kit' ), // The space and unsubscribe link are handled in the template. 350 'unsubscribe_url' => admin_url( 'admin.php?page=googlesitekit-settings#/admin-settings' ),446 'unsubscribe_url' => $email_settings_url, 351 447 'links' => array( 352 448 array( 353 449 'label' => __( 'Manage subscription', 'google-site-kit' ), 354 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard&email-reporting-panel=1' ),450 'url' => $email_settings_url, 355 451 ), 356 452 array( … … 360 456 array( 361 457 'label' => __( 'Help center', 'google-site-kit' ), 362 'url' => 'https://sitekit.withgoogle.com/documentation/troubleshooting/site-kit-support/',458 'url' => $help_center_url, 363 459 ), 364 460 ), -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Renderer.php
r3467940 r3479192 160 160 // Handle simple email templates (invitation-email, subscription-confirmation, etc.). 161 161 if ( 'email-report' !== $template_name ) { 162 if ( empty( $data['body'] ) ) {163 $data['body'] = Body_Content_Map::get_body( $template_name );164 }165 166 162 return Plain_Text_Formatter::format_simple_email( $data ); 167 163 } -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Email_Template_Renderer_Factory.php
r3438138 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 15 16 /** … … 32 33 33 34 /** 35 * Golinks instance. 36 * 37 * @since 1.174.0 38 * 39 * @var Golinks 40 */ 41 private $golinks; 42 43 /** 34 44 * Constructor. 35 45 * 36 46 * @since 1.170.0 47 * @since 1.174.0 Added golinks dependency. 37 48 * 38 49 * @param Context $context Plugin context. 50 * @param Golinks $golinks Golinks instance. 39 51 */ 40 public function __construct( Context $context ) {52 public function __construct( Context $context, Golinks $golinks ) { 41 53 $this->context = $context; 54 $this->golinks = $golinks; 42 55 } 43 56 … … 51 64 */ 52 65 public function create( array $sections_payload ) { 53 return new Email_Template_Renderer( new Sections_Map( $this->context, $sections_payload ) );66 return new Email_Template_Renderer( new Sections_Map( $this->context, $sections_payload, $this->golinks ) ); 54 67 } 55 68 } -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Initiator_Task.php
r3457523 r3479192 66 66 $user_ids = $this->subscribed_users_query->for_frequency( $frequency ); 67 67 68 $reference_dates = $this->build_reference_dates( $frequency, $timestamp );68 $reference_dates = self::build_reference_dates( $frequency, $timestamp ); 69 69 70 70 foreach ( $user_ids as $user_id ) { … … 81 81 Email_Log::META_SEND_ATTEMPTS => 0, 82 82 Email_Log::META_SITE_ID => get_current_blog_id(), 83 Email_Log::META_TEMPLATE_TYPE => Email_Log::TEMPLATE_TYPE_EMAIL_REPORT, 83 84 ), 84 85 ) … … 93 94 * Builds the report reference dates for a batch. 94 95 * 96 * @since 1.167.0 97 * @since 1.174.0 Made method static. 98 * 95 99 * @param string $frequency Frequency slug. 96 100 * @param int $timestamp Base timestamp. 97 101 * @return array Reference date payload. 98 102 */ 99 p rivatefunction build_reference_dates( $frequency, $timestamp ) {103 public static function build_reference_dates( $frequency, $timestamp ) { 100 104 $time_zone = wp_timezone(); 101 105 $send_date = ( new DateTimeImmutable( '@' . $timestamp ) ) -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Plain_Text_Formatter.php
r3467940 r3479192 45 45 * 46 46 * Simple emails share a common structure with customizable content. 47 * The preheader is used as the main message body in plain text format.48 47 * 49 48 * @since 1.173.0 50 49 * 51 * @param array $data The simple email data containing site, preheader, learn_more_url,52 * primary_call_to_action, and footer.50 * @param array $data The simple email data containing site, title, learn_more_url, 51 * primary_call_to_action, body, and footer. 53 52 * @return string Formatted plain text email. 54 53 */ 55 54 public static function format_simple_email( $data ) { 56 55 $site_domain = $data['site']['domain'] ?? ''; 57 $ preheader = $data['preheader'] ?? '';56 $title = wp_strip_all_tags( $data['title'] ?? '' ); 58 57 $learn_more_url = $data['learn_more_url'] ?? ''; 59 58 $cta = $data['primary_call_to_action'] ?? array(); … … 66 65 $site_domain, 67 66 '', 68 $preheader,69 '',70 67 ); 68 69 // Title. 70 if ( ! empty( $title ) ) { 71 $lines[] = $title; 72 $lines[] = ''; 73 } 71 74 72 75 // Body paragraphs (strip any HTML tags for plain text output). … … 91 94 $lines[] = ''; 92 95 } 96 97 $lines[] = str_repeat( '-', 50 ); 98 $lines[] = ''; 93 99 94 100 // Footer copy. -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Core\Email\Email; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 use Google\Site_Kit\Core\Modules\Modules; 15 16 use Google\Site_Kit\Core\Permissions\Permissions; … … 97 98 98 99 /** 100 * Golinks instance. 101 * 102 * @since 1.174.0 103 * @var Golinks 104 */ 105 private $golinks; 106 107 /** 99 108 * Constructor. 100 109 * … … 102 111 * @since 1.170.0 Added modules and user email reporting settings dependencies. 103 112 * @since 1.173.0 Added eligible subscribers query and email sender dependencies and removed unused user options dependency. 113 * @since 1.174.0 Added golinks dependency. 104 114 * 105 115 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. … … 108 118 * @param Eligible_Subscribers_Query $eligible_subscribers_query Eligible subscribers query instance. 109 119 * @param Email $email_sender Email sender instance. 120 * @param Golinks $golinks Golinks instance. 110 121 */ 111 122 public function __construct( … … 114 125 User_Email_Reporting_Settings $user_email_reporting_settings, 115 126 Eligible_Subscribers_Query $eligible_subscribers_query, 116 Email $email_sender 127 Email $email_sender, 128 Golinks $golinks 117 129 ) { 118 130 $this->settings = $settings; … … 122 134 $this->email_log_batch_query = new Email_Log_Batch_Query(); 123 135 $this->email_sender = $email_sender; 136 $this->golinks = $golinks; 124 137 } 125 138 … … 382 395 'role' => $this->get_primary_role( $user ), 383 396 'subscribed' => is_array( $settings ) && ! empty( $settings['subscribed'] ), 397 'invited' => $this->is_invite_rate_limited( $user->ID ), 384 398 ); 385 399 } … … 509 523 'url' => home_url( '/' ), 510 524 ), 511 'body' => Body_Content_Map::get_body( 'invitation-email' ), 525 'title' => Content_Map::get_title_with_args( 'invitation-email', array( $inviter_email ) ), 526 'body' => Content_Map::get_body( 'invitation-email' ), 512 527 'inviter_email' => $inviter_email, 513 528 'learn_more_url' => 'https://sitekit.withgoogle.com/documentation/email-reports/', 514 529 'primary_call_to_action' => array( 515 530 'label' => __( 'Get your report', 'google-site-kit' ), 516 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard' ),531 'url' => $this->golinks->get_url( 'manage-subscription-email-reporting' ), 517 532 ), 518 533 'footer' => array( -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/Sections_Map.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 15 16 /** … … 70 71 71 72 /** 73 * Golinks instance. 74 * 75 * @since 1.174.0 76 * @var Golinks 77 */ 78 protected $golinks; 79 80 /** 72 81 * Constructor. 73 82 * 74 83 * @since 1.168.0 84 * @since 1.174.0 Added golinks dependency. 75 85 * 76 86 * @param Context $context Plugin context. 77 87 * @param array $payload The payload data to be used in sections. 78 */ 79 public function __construct( Context $context, $payload ) { 88 * @param Golinks $golinks Golinks instance. 89 */ 90 public function __construct( Context $context, $payload, Golinks $golinks ) { 80 91 $this->context = $context; 81 92 $this->payload = $payload; 93 $this->golinks = $golinks; 94 } 95 96 /** 97 * Gets the dashboard golink URL. 98 * 99 * @since 1.174.0 100 * 101 * @return string Dashboard URL. 102 */ 103 protected function get_dashboard_url() { 104 return $this->golinks->get_url( 'dashboard' ); 82 105 } 83 106 … … 156 179 'icon' => 'conversions', 157 180 'section_template' => 'section-conversions', 158 'dashboard_url' => $this-> context->admin_url( 'dashboard'),181 'dashboard_url' => $this->get_dashboard_url(), 159 182 'section_parts' => $section_parts, 160 183 ), … … 215 238 'icon' => 'visitors', 216 239 'section_template' => 'section-metrics', 217 'dashboard_url' => $this-> context->admin_url( 'dashboard'),240 'dashboard_url' => $this->get_dashboard_url(), 218 241 'section_parts' => $section_parts, 219 242 ), … … 248 271 'icon' => 'search', 249 272 'section_template' => 'section-page-metrics', 250 'dashboard_url' => $this-> context->admin_url( 'dashboard'),273 'dashboard_url' => $this->get_dashboard_url(), 251 274 'section_parts' => $section_parts, 252 275 ), … … 287 310 'icon' => 'views', 288 311 'section_template' => 'section-page-metrics', 289 'dashboard_url' => $this-> context->admin_url( 'dashboard'),312 'dashboard_url' => $this->get_dashboard_url(), 290 313 'section_parts' => $section_parts, 291 314 ), … … 320 343 'icon' => 'growth', 321 344 'section_template' => 'section-page-metrics', 322 'dashboard_url' => $this-> context->admin_url( 'dashboard'),345 'dashboard_url' => $this->get_dashboard_url(), 323 346 'section_parts' => $section_parts, 324 347 ), -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/header.php
r3467940 r3479192 23 23 <tr> 24 24 <td style="vertical-align:top;" width="79"> 25 <img src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr__( 'Site Kit by Google', 'google-site-kit' ); ?>" width="79" height="22" style="display:block; margin-top: 12px;" />25 <img src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr__( 'Site Kit by Google', 'google-site-kit' ); ?>" width="79" height="22" style="display:block; margin-top: 8px;" /> 26 26 </td> 27 27 <?php /* Extra centering for Outlook. */ ?> 28 28 <td style="vertical-align:top; text-align:center;" align="center"> 29 29 <center> 30 <img src="<?php echo esc_url( $shooting_stars_url ); ?>" alt="" width="107" height="56" style="display:block; margin: 24px auto 0 auto;" align="center" />30 <img src="<?php echo esc_url( $shooting_stars_url ); ?>" alt="" width="107" height="56" style="display:block; margin: 12px auto 0 auto;" align="center" /> 31 31 </center> 32 32 </td> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions-metric-part.php
r3467940 r3479192 54 54 ?> 55 55 </td> 56 <td width="110" 57 style="font-size:12px; font-weight:500; color:#6C726E; text-align: right; width: 110px; padding-bottom: 10px;"> 56 <td class="subtitle" width="110" style="font-size:12px; font-weight:500; color:#6C726E; text-align: right; width: 110px; padding-bottom: 10px;"> 58 57 <?php echo esc_html( $change_context ); ?> 59 58 </td> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions.php
r3467940 r3479192 43 43 <?php echo esc_html( $section_parts['total_conversion_events']['data']['label'] ); ?> 44 44 </td> 45 <td width="110" style="font-size:12px; line-height:16px; font-weight:500; color:#6C726E; text-align: right; width: 110px;">45 <td class="subtitle" width="110" style="font-size:12px; line-height:16px; font-weight:500; color:#6C726E; text-align: right; width: 110px;"> 46 46 <?php echo esc_html( $section_parts['total_conversion_events']['data']['change_context'] ); ?> 47 47 </td> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php
r3467940 r3479192 44 44 <tr> 45 45 <td> </td> 46 <td width="110" 47 style="text-align: right; font-size:12px; line-height:16px; font-weight:500; color:#6C726E; width: 110px;"> 46 <td class="subtitle" width="110" style="text-align: right; font-size:12px; line-height:16px; font-weight:500; color:#6C726E; width: 110px;"> 48 47 <?php echo esc_html( $subtitle ); ?> 49 48 </td> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/email-report/template.php
r3467940 r3479192 20 20 $preheader = $data['preheader']; 21 21 $site_domain = $data['site']['domain']; 22 $site_url = $data['site']['url'];22 $site_url = ! empty( $data['site']['url'] ) ? $data['site']['url'] : ''; 23 23 $date_label = $data['date_range']['label']; 24 24 $primary_cta = $data['primary_call_to_action']; … … 110 110 overflow: hidden; 111 111 } 112 113 @media (min-width: 481px) { 114 .subtitle { 115 /* `!important` used to override inline styles in the element. */ 116 width: auto !important; 117 } 118 } 112 119 </style> 113 120 </head> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/invitation-email/template.php
r3467940 r3479192 18 18 $site_domain = $data['site']['domain']; 19 19 $site_url = $data['site']['url']; 20 $email_title = $data['title']; 20 21 $body = $data['body']; 21 22 $inviter_email = $data['inviter_email']; … … 143 144 </p> 144 145 145 <?php /* Invitation title. */ ?>146 <?php /* Title from Content_Map with inviter email link. */ ?> 146 147 <h1 style="font-size: 22px; line-height: 28px; font-weight: 500; color: #161B18; margin: 0 0 16px 0;"> 147 148 <?php 148 printf( 149 /* translators: %s: Email address of the person who sent the invitation (wrapped in mailto link) */ 150 esc_html__( '%s invited you to receive periodic performance reports', 'google-site-kit' ), 151 /* Mailto link styled to match title text as inline styles prevent email clients from auto-styling the email address as a blue link. */ 152 '<a href="mailto:' . esc_attr( $inviter_email ) . '" style="color: #161B18; text-decoration: none; font-weight: 500;">' . esc_html( $inviter_email ) . '</a>' 153 ); 149 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Contains pre-escaped mailto link. 150 echo $email_title; 154 151 ?> 155 152 </h1> 156 153 157 <?php /* Body paragraphs from Body_Content_Map. */ ?>154 <?php /* Body paragraphs from Content_Map. */ ?> 158 155 <?php foreach ( $body as $index => $paragraph ) : ?> 159 156 <p style="font-size: 14px; line-height: 20px; font-weight: 400; color: #161B18; margin: 0 0 16px 0;"> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/subscription-confirmation/parts/content.php
r3467940 r3479192 13 13 * @var string $site_domain The site domain. 14 14 * @var string $site_url The full site URL with protocol. 15 * @var string $title The email title. 15 16 * @var array $body Body paragraphs (may contain HTML). 16 17 * @var array $cta Primary CTA configuration with 'url' and 'label'. … … 38 39 </p> 39 40 40 <?php /* Title . */ ?>41 <?php /* Title from Content_Map. */ ?> 41 42 <h1 style="font-size: 22px; line-height: 28px; font-weight: 500; color: #161B18; margin: 0 0 16px 0;"> 42 <?php echo esc_html __( 'Success! You’re subscribed to Site Kit reports', 'google-site-kit'); ?>43 <?php echo esc_html( $title ); ?> 43 44 </h1> 44 45 45 <?php /* Body paragraphs from Body_Content_Map. */ ?>46 <?php /* Body paragraphs from Content_Map. */ ?> 46 47 <?php foreach ( $body as $paragraph ) : ?> 47 48 <p style="font-size: 14px; line-height: 20px; font-weight: 400; color: #161B18; margin: 0 0 16px 0;"> -
google-site-kit/tags/1.174.0/includes/Core/Email_Reporting/templates/subscription-confirmation/template.php
r3467940 r3479192 18 18 $site_domain = $data['site']['domain']; 19 19 $site_url = $data['site']['url']; 20 $email_title = $data['title']; 20 21 $body = $data['body']; 21 22 $cta = $data['primary_call_to_action']; … … 138 139 'site_domain' => $site_domain, 139 140 'site_url' => $site_url, 141 'title' => $email_title, 140 142 'body' => $body, 141 143 'cta' => $cta, -
google-site-kit/tags/1.174.0/includes/Core/Modules/Module_With_Owner.php
r3118692 r3479192 10 10 11 11 namespace Google\Site_Kit\Core\Modules; 12 13 use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client; 12 14 13 15 /** … … 28 30 */ 29 31 public function get_owner_id(); 32 33 /** 34 * Gets the OAuth_Client instance for the module owner. 35 * 36 * @since 1.174.0 37 * 38 * @return OAuth_Client OAuth_Client instance. 39 */ 40 public function get_owner_oauth_client(); 30 41 } -
google-site-kit/tags/1.174.0/includes/Core/Permissions/Permissions.php
r3349867 r3479192 392 392 */ 393 393 private function check_dashboard_sharing_capability( $cap, $user_id, $args ) { 394 if ( isset( $args[0] ) ) { 395 $module_slug = $args[0]; 396 } 394 $module_slug = $args[0] ?? ''; 397 395 398 396 switch ( $cap ) { -
google-site-kit/tags/1.174.0/includes/Core/Storage/Encrypted_User_Options.php
r2466816 r3479192 127 127 * 128 128 * @since 1.4.0 129 * @since 1.174.0 Returns callable to restore previous user. 129 130 * 130 131 * @param int $user_id User ID. 132 * @return callable A closure to switch back to the original user. 131 133 */ 132 134 public function switch_user( $user_id ) { 133 $this->user_options->switch_user( $user_id );135 return $this->user_options->switch_user( $user_id ); 134 136 } 135 137 } -
google-site-kit/tags/1.174.0/includes/Core/User/Email_Reporting.php
r3389193 r3479192 11 11 namespace Google\Site_Kit\Core\User; 12 12 13 use Google\Site_Kit\Core\Email_Reporting\Email_Reporting_Scheduler; 14 use Google\Site_Kit\Core\Email_Reporting\Frequency_Planner; 13 15 use Google\Site_Kit\Core\Storage\User_Options; 14 16 … … 46 48 */ 47 49 public function __construct( User_Options $user_options ) { 50 $frequency_planner = new Frequency_Planner(); 51 $scheduler = new Email_Reporting_Scheduler( $frequency_planner ); 52 48 53 $this->email_reporting_settings = new Email_Reporting_Settings( $user_options ); 49 $this->rest_controller = new REST_Email_Reporting_Controller( $this->email_reporting_settings ); 54 $this->rest_controller = new REST_Email_Reporting_Controller( 55 $this->email_reporting_settings, 56 $scheduler 57 ); 50 58 } 51 59 -
google-site-kit/tags/1.174.0/includes/Core/User/REST_Email_Reporting_Controller.php
r3397601 r3479192 11 11 namespace Google\Site_Kit\Core\User; 12 12 13 use Google\Site_Kit\Core\Email_Reporting\Email_Reporting_Scheduler; 13 14 use Google\Site_Kit\Core\Permissions\Permissions; 14 15 use Google\Site_Kit\Core\REST_API\REST_Route; … … 36 37 37 38 /** 39 * Email reporting scheduler instance. 40 * 41 * @since 1.174.0 42 * @var Email_Reporting_Scheduler 43 */ 44 private $scheduler; 45 46 /** 38 47 * Constructor. 39 48 * 40 49 * @since 1.162.0 41 50 * 42 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. 51 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. 52 * @param Email_Reporting_Scheduler $scheduler Scheduler instance. 43 53 */ 44 public function __construct( Email_Reporting_Settings $settings ) { 45 $this->settings = $settings; 54 public function __construct( Email_Reporting_Settings $settings, Email_Reporting_Scheduler $scheduler ) { 55 $this->settings = $settings; 56 $this->scheduler = $scheduler; 46 57 } 47 58 … … 98 109 'methods' => WP_REST_Server::EDITABLE, 99 110 'callback' => function ( WP_REST_Request $request ) { 111 $previous_settings = $this->settings->get(); 100 112 $settings = $request['data']['settings']; 101 113 102 114 $this->settings->merge( $settings ); 103 115 104 return new WP_REST_Response( $this->settings->get() ); 116 $updated_settings = $this->settings->get(); 117 118 $scheduling_error = $this->scheduler->schedule_email_confirmation( 119 get_current_user_id(), 120 $previous_settings, 121 $updated_settings 122 ); 123 124 if ( is_wp_error( $scheduling_error ) ) { 125 return $scheduling_error; 126 } 127 128 return new WP_REST_Response( $updated_settings ); 105 129 }, 106 130 'permission_callback' => $can_view_dashboard, -
google-site-kit/tags/1.174.0/includes/Core/User_Input/Site_Specific_Answers.php
r3118692 r3479192 103 103 $valid_values['values'] = $valid_answers; 104 104 105 if ( ! empty( $valid_values ) ) { 106 $results[ $setting_key ] = $valid_values; 107 } 105 $results[ $setting_key ] = $valid_values; 108 106 } 109 107 -
google-site-kit/tags/1.174.0/includes/Core/User_Input/User_Specific_Answers.php
r3118692 r3479192 102 102 $valid_values['values'] = $valid_answers; 103 103 104 if ( ! empty( $valid_values ) ) { 105 $results[ $setting_key ] = $valid_values; 106 } 104 $results[ $setting_key ] = $valid_values; 107 105 } 108 106 -
google-site-kit/tags/1.174.0/includes/Core/Util/BC_Functions.php
r3447448 r3479192 19 19 * @access private 20 20 * @ignore 21 * 22 * @method static void wp_print_script_tag( $attributes ) 23 * @method static void wp_print_inline_script_tag( $javascript, $attributes = array() ) 24 * @method static bool array_is_list( array $value ) 21 25 */ 22 26 class BC_Functions { -
google-site-kit/tags/1.174.0/includes/Core/Util/Entity_Factory.php
r3148853 r3479192 266 266 // See WordPress's `get_the_archive_title()` function for this behavior. The strings here intentionally omit 267 267 // the 'google-site-kit' text domain since they should use WordPress core translations. 268 $title = $term->name; 269 268 270 switch ( $term->taxonomy ) { 269 271 case 'category': 270 $title = $term->name;271 272 $prefix = _x( 'Category:', 'category archive title prefix', 'default' ); 272 273 break; 273 274 case 'post_tag': 274 $title = $term->name;275 275 $prefix = _x( 'Tag:', 'tag archive title prefix', 'default' ); 276 276 break; … … 309 309 default: 310 310 $tax = get_taxonomy( $term->taxonomy ); 311 $title = $term->name;312 311 $prefix = sprintf( 313 312 /* translators: %s: Taxonomy singular name. */ -
google-site-kit/tags/1.174.0/includes/Core/Util/URL.php
r3148853 r3479192 10 10 11 11 namespace Google\Site_Kit\Core\Util; 12 13 use Exception; 12 14 13 15 /** … … 69 71 } 70 72 71 return _get_component_from_parsed_url_array( $parts, $component ); 73 return _get_component_from_parsed_url_array( $parts, $component ); // @phpstan-ignore function.internal 72 74 } 73 75 -
google-site-kit/tags/1.174.0/includes/Modules/Analytics_4.php
r3457523 r3479192 940 940 * @since 1.1.0 941 941 * 942 * @param $disabled boolWhether to disable tracking or not.942 * @param bool $disabled Whether to disable tracking or not. 943 943 */ 944 944 return (bool) apply_filters( 'googlesitekit_analytics_tracking_disabled', $disabled ); … … 2428 2428 ); 2429 2429 } 2430 return array(); 2430 2431 } 2431 2432 -
google-site-kit/tags/1.174.0/includes/Modules/Analytics_4/Audience_Utilities.php
r3457523 r3479192 198 198 */ 199 199 private function get_audience_type( $audience_slug ) { 200 if ( ! $audience_slug ) {201 return 'USER_AUDIENCE';202 }203 204 200 switch ( $audience_slug ) { 205 201 case 'all-users': … … 210 206 return 'SITE_KIT_AUDIENCE'; 211 207 } 208 209 return 'USER_AUDIENCE'; 212 210 } 213 211 -
google-site-kit/tags/1.174.0/includes/Modules/Analytics_4/Synchronize_AdSenseLinked.php
r3118692 r3479192 14 14 use Google\Site_Kit\Core\Storage\Options; 15 15 use Google\Site_Kit\Core\Storage\User_Options; 16 use Google\Site_Kit\Modules\Ad sense;16 use Google\Site_Kit\Modules\AdSense; 17 17 use Google\Site_Kit\Modules\Analytics_4; 18 use Google\Site_Kit\Modules\AdSense\Settings as Ad sense_Settings;18 use Google\Site_Kit\Modules\AdSense\Settings as AdSense_Settings; 19 19 20 20 /** … … 82 82 83 83 /** 84 * Cron callback for synchronizing the adsense linked data.84 * Cron callback for synchronizing the AdSense linked data. 85 85 * 86 86 * @since 1.123.0 -
google-site-kit/tags/1.174.0/includes/Modules/Reader_Revenue_Manager.php
r3467940 r3479192 46 46 use Google\Site_Kit\Core\Tracking\Provides_Feature_Metrics; 47 47 use Google\Site_Kit\Core\Util\Block_Support; 48 use Google\Site_Kit\Core\Util\Feature_Flags;49 48 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 50 49 use Google\Site_Kit\Core\Util\URL; … … 220 219 } 221 220 222 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) { 223 foreach ( self::POLICY_VIOLATION_NOTIFICATIONS as $notification ) { 224 $dismissed_items->remove( $notification ); 225 } 221 foreach ( self::POLICY_VIOLATION_NOTIFICATIONS as $notification ) { 222 $dismissed_items->remove( $notification ); 226 223 } 227 224 } … … 817 814 } 818 815 819 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) &&isset( $settings['contentPolicyStatus'] ) ) {816 if ( isset( $settings['contentPolicyStatus'] ) ) { 820 817 $content_policy_status = (array) $settings['contentPolicyStatus']; 821 818 $content_policy_state = $content_policy_status['contentPolicyState'] ?? ''; -
google-site-kit/tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php
r3253534 r3479192 75 75 } 76 76 77 add_action( 78 'bulk_edit_custom_box', 79 array( $this, 'bulk_edit_field' ), 80 10, 81 2 82 ); 83 77 add_action( 'bulk_edit_custom_box', array( $this, 'bulk_edit_field' ) ); 84 78 add_action( 'save_post', array( $this, 'save_field' ) ); 85 79 } -
google-site-kit/tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Settings.php
r3447448 r3479192 16 16 use Google\Site_Kit\Core\Storage\Setting_With_ViewOnly_Keys_Interface; 17 17 use Google\Site_Kit\Core\Util\BC_Functions; 18 use Google\Site_Kit\Core\Util\Feature_Flags;19 18 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 20 19 … … 71 70 */ 72 71 protected function get_default() { 73 $defaults = array( 72 return array( 73 'contentPolicyStatus' => (object) array(), 74 74 'ownerID' => 0, 75 75 'publicationID' => '', … … 82 82 'productID' => 'openaccess', 83 83 ); 84 85 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) {86 $defaults['contentPolicyStatus'] = (object) array();87 }88 89 return $defaults;90 84 } 91 85 … … 190 184 } 191 185 192 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) &&isset( $option['contentPolicyStatus'] ) ) {186 if ( isset( $option['contentPolicyStatus'] ) ) { 193 187 // If the `contentPolicyStatus` setting is not an associative array, set it to an empty object. 194 188 if ( ! ( is_array( $option['contentPolicyStatus'] ) && ! BC_Functions::array_is_list( $option['contentPolicyStatus'] ) ) ) { -
google-site-kit/tags/1.174.0/includes/Modules/Reader_Revenue_Manager/Synchronize_Publication.php
r3447448 r3479192 13 13 use Google\Site_Kit\Core\Permissions\Permissions; 14 14 use Google\Site_Kit\Core\Storage\User_Options; 15 use Google\Site_Kit\Core\Util\Feature_Flags;16 15 use Google\Site_Kit\Modules\Reader_Revenue_Manager; 17 16 use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Publication; … … 128 127 ); 129 128 130 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) { 131 $content_policy_status = $publication->getContentPolicyStatus(); 132 133 if ( $content_policy_status ) { 134 $new_settings['contentPolicyStatus'] = (array) $content_policy_status->toSimpleObject(); 135 } 129 $content_policy_status = $publication->getContentPolicyStatus(); 130 131 if ( $content_policy_status ) { 132 $new_settings['contentPolicyStatus'] = (array) $content_policy_status->toSimpleObject(); 136 133 } 137 134 -
google-site-kit/tags/1.174.0/includes/Modules/Search_Console/Email_Reporting/Report_Data_Builder.php
r3447448 r3479192 473 473 } 474 474 475 if ( empty( $labels ) ) {476 return null;477 }478 479 475 return array( 480 476 'section_key' => $section_key, -
google-site-kit/tags/1.174.0/includes/Modules/Sign_In_With_Google.php
r3389193 r3479192 522 522 * @param array $args Optional arguments to customize button attributes. 523 523 */ 524 do_action( 'googlesitekit_render_sign_in_with_google_button' );524 do_action( 'googlesitekit_render_sign_in_with_google_button', array() ); 525 525 $content .= ob_get_clean(); 526 526 } -
google-site-kit/tags/1.174.0/includes/Plugin.php
r3457523 r3479192 184 184 $permissions = new Core\Permissions\Permissions( $this->context, $authentication, $modules, $user_options, $dismissed_items ); 185 185 $permissions->register(); 186 187 $golinks = new Core\Golinks\Golinks( $this->context ); 188 $golinks->register(); 189 $golinks->register_handler( 'dashboard', new Core\Golinks\Dashboard_Golink_Handler() ); 186 190 187 191 $nonces = new Core\Nonces\Nonces( $this->context ); … … 241 245 ); 242 246 243 ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $ authentication, $options, $user_options ) )->register();247 ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $golinks, $authentication, $options, $user_options ) )->register(); 244 248 } 245 249 … … 318 322 319 323 if ( file_exists( GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php' ) ) { 320 $config = include GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php'; 324 $config = include GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php'; // @phpstan-ignore include.fileNotFound 321 325 Feature_Flags::set_features( (array) $config['features'] ); 322 326 } -
google-site-kit/tags/1.174.0/includes/loader.php
r3118692 r3479192 10 10 11 11 namespace Google\Site_Kit; 12 13 // Define global constants.14 define( 'GOOGLESITEKIT_PLUGIN_BASENAME', plugin_basename( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );15 define( 'GOOGLESITEKIT_PLUGIN_DIR_PATH', plugin_dir_path( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );16 12 17 13 /** -
google-site-kit/tags/1.174.0/includes/vendor/composer/autoload_classmap.php
r3467940 r3479192 85 85 'Google\\Site_Kit\\Core\\Dismissals\\REST_Dismissals_Controller' => $baseDir . '/Core/Dismissals/REST_Dismissals_Controller.php', 86 86 'Google\\Site_Kit\\Core\\Email\\Email' => $baseDir . '/Core/Email/Email.php', 87 'Google\\Site_Kit\\Core\\Email_Reporting\\ Body_Content_Map' => $baseDir . '/Core/Email_Reporting/Body_Content_Map.php',87 'Google\\Site_Kit\\Core\\Email_Reporting\\Content_Map' => $baseDir . '/Core/Email_Reporting/Content_Map.php', 88 88 'Google\\Site_Kit\\Core\\Email_Reporting\\Eligible_Subscribers_Query' => $baseDir . '/Core/Email_Reporting/Eligible_Subscribers_Query.php', 89 89 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Assets' => $baseDir . '/Core/Email_Reporting/Email_Assets.php', … … 98 98 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting' => $baseDir . '/Core/Email_Reporting/Email_Reporting.php', 99 99 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Data_Requests' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Data_Requests.php', 100 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Golink_Handler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Golink_Handler.php', 100 101 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Pointer' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Pointer.php', 101 102 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Scheduler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Scheduler.php', … … 115 116 'Google\\Site_Kit\\Core\\Email_Reporting\\Sections_Map' => $baseDir . '/Core/Email_Reporting/Sections_Map.php', 116 117 'Google\\Site_Kit\\Core\\Email_Reporting\\Subscribed_Users_Query' => $baseDir . '/Core/Email_Reporting/Subscribed_Users_Query.php', 118 'Google\\Site_Kit\\Core\\Email_Reporting\\Subscription_Confirmation_Task' => $baseDir . '/Core/Email_Reporting/Subscription_Confirmation_Task.php', 117 119 'Google\\Site_Kit\\Core\\Email_Reporting\\Worker_Task' => $baseDir . '/Core/Email_Reporting/Worker_Task.php', 118 120 'Google\\Site_Kit\\Core\\Expirables\\Expirable_Items' => $baseDir . '/Core/Expirables/Expirable_Items.php', … … 122 124 'Google\\Site_Kit\\Core\\Feature_Tours\\Feature_Tours' => $baseDir . '/Core/Feature_Tours/Feature_Tours.php', 123 125 'Google\\Site_Kit\\Core\\Feature_Tours\\REST_Feature_Tours_Controller' => $baseDir . '/Core/Feature_Tours/REST_Feature_Tours_Controller.php', 126 'Google\\Site_Kit\\Core\\Golinks\\Dashboard_Golink_Handler' => $baseDir . '/Core/Golinks/Dashboard_Golink_Handler.php', 127 'Google\\Site_Kit\\Core\\Golinks\\Golink_Handler_Interface' => $baseDir . '/Core/Golinks/Golink_Handler_Interface.php', 128 'Google\\Site_Kit\\Core\\Golinks\\Golinks' => $baseDir . '/Core/Golinks/Golinks.php', 124 129 'Google\\Site_Kit\\Core\\Guards\\Guard_Interface' => $baseDir . '/Core/Guards/Guard_Interface.php', 125 130 'Google\\Site_Kit\\Core\\HTTP\\Middleware' => $baseDir . '/Core/HTTP/Middleware.php', -
google-site-kit/tags/1.174.0/readme.txt
r3467940 r3479192 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.17 3.07 Stable tag: 1.174.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.17 3.0 =112 = 1.174.0 = 113 113 114 114 **Enhanced** 115 115 116 * Reset Reader Revenue Manager policy violation notification dismissals when connecting a different publication, or disconnecting the service. See [#12189](https://github.com/google/site-kit-wp/issues/12189). 117 * Update opt-in user tracking for Reader Revenue Manager setup success notification. See [#12104](https://github.com/google/site-kit-wp/issues/12104). 118 * Add GA4 tracking events for RRM policy violation notifications. See [#12103](https://github.com/google/site-kit-wp/issues/12103). 119 * Prevent the Welcome modal from being shown to existing users when the Setup Flow Refresh feature flag is enabled. See [#12068](https://github.com/google/site-kit-wp/issues/12068). 120 * Add "Action needed" badge to RRM module status for policy violations. See [#12017](https://github.com/google/site-kit-wp/issues/12017). 121 * Add Reader Revenue Manager policy violation notifications in Site Kit settings. See [#12014](https://github.com/google/site-kit-wp/issues/12014). 122 * Update email report to include dynamic conversion metrics based on sites' tracked metrics. See [#12001](https://github.com/google/site-kit-wp/issues/12001). 123 * Update the unsubscribe notice of Email Reporting to have a black background. See [#11996](https://github.com/google/site-kit-wp/issues/11996). 124 * Add a confirmation before disabling the Email Reporting settings. See [#11862](https://github.com/google/site-kit-wp/issues/11862). 125 * Add subscription confirmation email template. See [#11853](https://github.com/google/site-kit-wp/issues/11853). 126 * Add email invite template for email reporting. See [#11851](https://github.com/google/site-kit-wp/issues/11851). 127 * Add Email Reporting stats to feature metrics. See [#11850](https://github.com/google/site-kit-wp/issues/11850). 128 * Add the Search Console-only dashboard tour for the new setup flow. See [#11814](https://github.com/google/site-kit-wp/issues/11814). 129 * Add support for base admin URLs that already contain query parameters in the `getAdminURL` selector. Props xipasduarte. See [#11115](https://github.com/google/site-kit-wp/issues/11115). 130 * Add controls for Reader Revenue Manager settings in the WordPress site editor. See [#10312](https://github.com/google/site-kit-wp/issues/10312). 116 * Improve dismissal behavior for RRM policy violation notifications by delaying them for 24 hours after setup and allowing extreme notifications to reappear up to 5 times before permanent dismissal. See [#12247](https://github.com/google/site-kit-wp/issues/12247). 117 * Improve UX of Reader Revenue Manager module setup success notification when setting it up with a publication that has an extreme policy violation. See [#12245](https://github.com/google/site-kit-wp/issues/12245). 118 * Remove the `rrmPolicyViolations` feature flag. Props fresh3nough. See [#12232](https://github.com/google/site-kit-wp/issues/12232). 119 * Add error tracking for Site Kit modules to Email Reporting. See [#12110](https://github.com/google/site-kit-wp/issues/12110). 120 * Remove "New" badges from several modules/settings that are no longer new. See [#12096](https://github.com/google/site-kit-wp/issues/12096). 121 * Ensure the correct GA events are tracked for the dashboard tour. See [#12030](https://github.com/google/site-kit-wp/issues/12030). 122 * Add GA event tracking for user interactions with the "activate Analytics" notification. See [#12028](https://github.com/google/site-kit-wp/issues/12028). 123 * Add GA event tracking for user interaction with the Welcome modal. See [#12027](https://github.com/google/site-kit-wp/issues/12027). 124 * Enhance the reauthentication admin notice to continue an interrupted module setup flow after the user grants the required scopes. See [#11989](https://github.com/google/site-kit-wp/issues/11989). 125 * Adjust desktop layout on email reporting email-report template. See [#11898](https://github.com/google/site-kit-wp/issues/11898). 126 * Ensure query params persist during email subscription flow. See [#11890](https://github.com/google/site-kit-wp/issues/11890). 127 * Include the AdSense menu item in the updated help menu. See [#11877](https://github.com/google/site-kit-wp/issues/11877). 128 * Add component to allow subscription invitations. See [#11857](https://github.com/google/site-kit-wp/issues/11857). 129 * Add error email template. See [#11852](https://github.com/google/site-kit-wp/issues/11852). 130 * Add support for stable deep links to dashboard and email subscription management. See [#11849](https://github.com/google/site-kit-wp/issues/11849). 131 * Implement Email Reporting subscription confirmation email. See [#11842](https://github.com/google/site-kit-wp/issues/11842). 132 * Allow users to start the dashboard feature tour from the "Start a feature tour" item in the help menu. See [#11820](https://github.com/google/site-kit-wp/issues/11820). 133 * Add a notification that prompts users to connect more services after completing Site Kit setup. See [#11818](https://github.com/google/site-kit-wp/issues/11818). 131 134 132 135 **Fixed** 133 136 134 * Fix the issue when users with no permissions received emails from Email Reporting. See [#12152](https://github.com/google/site-kit-wp/issues/12152).135 * Update email headings text to use sentence-case. See [#11966](https://github.com/google/site-kit-wp/issues/11966).136 * Select the "In the field" tab immediately in the PageSpeed Insights widget when field data is available, preventing a flicker due to the "In the Lab" tab being active initially. See [#11173](https://github.com/google/site-kit-wp/issues/11173).137 * Fix bug that caused the Key Metrics banner not to be dismissed. See [#12158](https://github.com/google/site-kit-wp/issues/12158). 138 * Optimize requests for view-only users of Dashboard Sharing when Analytics module is not shared. See [#11994](https://github.com/google/site-kit-wp/issues/11994). 139 * Fix bug that caused text on some notification banners to change/flicker when clicked. See [#11188](https://github.com/google/site-kit-wp/issues/11188). 137 140 138 141 [See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt). -
google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/rrm-contribute-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Contribute with Google", 7 7 "category": "widgets", -
google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/contribute-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/rrm-contribute-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Contribute with Google", 7 7 "category": "widgets", -
google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/rrm-subscribe-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Subscribe with Google", 7 7 "category": "widgets", -
google-site-kit/trunk/dist/assets/blocks/reader-revenue-manager/subscribe-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/rrm-subscribe-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Subscribe with Google", 7 7 "category": "widgets", -
google-site-kit/trunk/dist/assets/blocks/sign-in-with-google/block.json
r3467940 r3479192 3 3 "apiVersion": 2, 4 4 "name": "google-site-kit/sign-in-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Sign in with Google", 7 7 "category": "widgets", … … 12 12 "shape": { 13 13 "type": "string", 14 "enum": [ "", "rectangular", "pill"]14 "enum": [ "", "rectangular", "pill" ] 15 15 }, 16 16 "text": { … … 26 26 "theme": { 27 27 "type": "string", 28 "enum": [ "", "outline", "filled_blue", "filled_black"]28 "enum": [ "", "outline", "filled_blue", "filled_black" ] 29 29 }, 30 30 "buttonClassName": { -
google-site-kit/trunk/dist/assets/blocks/sign-in-with-google/v3/block.json
r3467940 r3479192 3 3 "apiVersion": 3, 4 4 "name": "google-site-kit/sign-in-with-google", 5 "version": "1.17 3.0",5 "version": "1.174.0", 6 6 "title": "Sign in with Google", 7 7 "category": "widgets", -
google-site-kit/trunk/dist/config.php
r3457523 r3479192 8 8 9 9 return array( 10 'features' => array( 'googleTagGateway','gtagUserData','privacySandboxModule','proactiveUserEngagement',' rrmPolicyViolations','setupFlowRefresh' ),10 'features' => array( 'googleTagGateway','gtagUserData','privacySandboxModule','proactiveUserEngagement','setupFlowRefresh' ), 11 11 ); -
google-site-kit/trunk/dist/manifest.php
r3467940 r3479192 28 28 'sign-in-with-google/index' => array( "sign-in-with-google/index.js", null ), 29 29 'sign-in-with-google/editor-styles' => array( "sign-in-with-google/editor-styles.js", null ), 30 'googlesitekit-admin-css' => array( "googlesitekit-admin-css- d9aa9ae0497bce9f2e2b.min.css", null ),30 'googlesitekit-admin-css' => array( "googlesitekit-admin-css-b0a55e41cd054885c01d.min.css", null ), 31 31 'googlesitekit-adminbar-css' => array( "googlesitekit-adminbar-css-da31a8a65334682e590b.min.css", null ), 32 32 'googlesitekit-wp-dashboard-css' => array( "googlesitekit-wp-dashboard-css-ff8420adbc8b86a5776c.min.css", null ), 33 33 'googlesitekit-authorize-application-css' => array( "googlesitekit-authorize-application-css-5b98b536e7f34c6411c1.min.css", null ), 34 'googlesitekit-api' => array( "googlesitekit-api- 1b42ccd8014a64002e13.js", null ),34 'googlesitekit-api' => array( "googlesitekit-api-6b742f1f3e956905b33c.js", null ), 35 35 'googlesitekit-data' => array( "googlesitekit-data-ab56c0ab3c6231462584.js", null ), 36 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site- 0ad3830862d5da40c7cc.js", null ),37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user- ee3b9189c8a41f17a304.js", null ),38 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms- 5c9a265fe07db133d11e.js", null ),36 'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site-d81d1d7e77fb878db074.js", null ), 37 'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user-50662a4a25e8662f50d2.js", null ), 38 'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms-75b32a3db427355b3d54.js", null ), 39 39 'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location-6671f1e766c63f15d64f.js", null ), 40 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui- aae8b190894508c436a3.js", null ),41 'googlesitekit-modules' => array( "googlesitekit-modules- ec132025723e115c493e.js", null ),42 'googlesitekit-notifications' => array( "googlesitekit-notifications- aa32e0cf3becd3087d95.js", null ),43 'googlesitekit-widgets' => array( "googlesitekit-widgets- c56d4ffc3e0d41ad8632.js", null ),44 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads- f2cd5b1ca68cdc0afafc.js", null ),45 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense- caf75cf03cc3f65ad722.js", null ),46 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4- 08baceaf34b9dc342006.js", null ),47 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights- 6460d6ee27011faeb822.js", null ),48 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager- 35a4e97b0acf40878735.js", null ),49 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console- 878bb1ae8fdd94ea3668.js", null ),50 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google- 99767d36de8ec7cc6fd9.js", null ),51 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager- d3dc9c4311dfd79986ce.js", null ),52 'googlesitekit-user-input' => array( "googlesitekit-user-input- c6ffcdff35f0c900e28b.js", null ),53 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery- b2c14915cb4d745197eb.js", null ),54 'googlesitekit-block-tracking' => array( "googlesitekit-block-tracking- 562fd213268d8cb25f04.js", null ),40 'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui-6ae38e48c7d1c550209c.js", null ), 41 'googlesitekit-modules' => array( "googlesitekit-modules-019df226afc930fb7baa.js", null ), 42 'googlesitekit-notifications' => array( "googlesitekit-notifications-d97f80ea7c9788e8616a.js", null ), 43 'googlesitekit-widgets' => array( "googlesitekit-widgets-291ae05540f5ce1d4b5f.js", null ), 44 'googlesitekit-modules-ads' => array( "googlesitekit-modules-ads-87ff0f042c3f8bb75ffe.js", null ), 45 'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense-da3acba40b247879cea2.js", null ), 46 'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4-6c316f95903d72619464.js", null ), 47 'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights-e61b3aaa46e17ebf457f.js", null ), 48 'googlesitekit-modules-reader-revenue-manager' => array( "googlesitekit-modules-reader-revenue-manager-28b1f326a7af16311546.js", null ), 49 'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console-42651fba89fd889cbbe8.js", null ), 50 'googlesitekit-modules-sign-in-with-google' => array( "googlesitekit-modules-sign-in-with-google-aa284c1fba6c038e71ff.js", null ), 51 'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager-c24942280b3785810fd1.js", null ), 52 'googlesitekit-user-input' => array( "googlesitekit-user-input-ace5668810c71164dfe0.js", null ), 53 'googlesitekit-ad-blocking-recovery' => array( "googlesitekit-ad-blocking-recovery-781b5e4c086bb56009ee.js", null ), 54 'googlesitekit-block-tracking' => array( "googlesitekit-block-tracking-15a11a002738d55d094b.js", null ), 55 55 'googlesitekit-polyfills' => array( "googlesitekit-polyfills-f2726df5859ebd38706b.js", null ), 56 56 'googlesitekit-components' => array( "googlesitekit-components-1288bf8a9eda8d2eaa36.js", null ), 57 'googlesitekit-metric-selection' => array( "googlesitekit-metric-selection- c09232a39f84c396a99f.js", null ),58 'googlesitekit-key-metrics-setup' => array( "googlesitekit-key-metrics-setup- f327cd289672fb9d8d5c.js", null ),59 'googlesitekit-activation' => array( "googlesitekit-activation- a18418b23eed5131e342.js", null ),60 'googlesitekit-adminbar' => array( "googlesitekit-adminbar- 8b23f8ec0b9885d93b72.js", null ),61 'googlesitekit-admin-pointers-tracking' => array( "googlesitekit-admin-pointers-tracking- c845ba1cde77a0f3bc14.js", null ),62 'googlesitekit-settings' => array( "googlesitekit-settings- 83ebe6d5a541de36c404.js", null ),63 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard- 4385a32f5ff0102cb3d2.js", null ),64 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard- b61e170cdb6b569e03bb.js", null ),65 'googlesitekit-splash' => array( "googlesitekit-splash- 46fa2e595d002163ed1b.js", null ),66 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard- a5d6a1d4bf8a176fcac7.js", null ),57 'googlesitekit-metric-selection' => array( "googlesitekit-metric-selection-878a437e42477c6d1739.js", null ), 58 'googlesitekit-key-metrics-setup' => array( "googlesitekit-key-metrics-setup-acc873033a51c241703a.js", null ), 59 'googlesitekit-activation' => array( "googlesitekit-activation-33cfec7e5d5ce1d52c84.js", null ), 60 'googlesitekit-adminbar' => array( "googlesitekit-adminbar-edc2347b3d5db1c50fe9.js", null ), 61 'googlesitekit-admin-pointers-tracking' => array( "googlesitekit-admin-pointers-tracking-aaf3edcbdbcc6193ae8f.js", null ), 62 'googlesitekit-settings' => array( "googlesitekit-settings-244369c6fd856ce6cdf5.js", null ), 63 'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard-0712bc98382fa42245ba.js", null ), 64 'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard-50d1fe8d423ac6604e9a.js", null ), 65 'googlesitekit-splash' => array( "googlesitekit-splash-f26e7cde106af6278046.js", null ), 66 'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard-eec86376ce895eb5422a.js", null ), 67 67 'googlesitekit-runtime' => array( "runtime-4b2eb8d81a08b104395a.js", null ), 68 68 'googlesitekit-vendor' => array( "googlesitekit-vendor-568c1105b8e4f20eff16.js", null ), -
google-site-kit/trunk/google-site-kit.php
r3467940 r3479192 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.17 3.014 * Version: 1.174.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.17 3.0' );29 define( 'GOOGLESITEKIT_VERSION', '1.174.0' ); 30 30 define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ ); 31 define( 'GOOGLESITEKIT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 32 define( 'GOOGLESITEKIT_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) ); 31 33 define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' ); 32 34 define( 'GOOGLESITEKIT_WP_MINIMUM', '5.2.0' ); -
google-site-kit/trunk/includes/Context.php
r3349867 r3479192 379 379 // If recent version, we can properly detect the mode. 380 380 if ( $amp_plugin_version_2_or_higher ) { 381 $mode = AMP_Options_Manager::get_option( 'theme_support' ); 381 $mode = AMP_Options_Manager::get_option( 'theme_support' ); // @phpstan-ignore class.notFound 382 382 } else { 383 383 $mode = AMP_Theme_Support::get_support_mode(); -
google-site-kit/trunk/includes/Core/Admin/Screens.php
r3407206 r3479192 190 190 $dashboard_index = array_search( 'index.php', $menu_order, true ); 191 191 192 $sitekit_index = false; 192 if ( false === $dashboard_index ) { 193 return $menu_order; 194 } 195 193 196 foreach ( $menu_order as $key => $value ) { 194 197 if ( strpos( $value, self::PREFIX ) === 0 ) { 195 $sitekit_index = $key;196 $sitekit_value = $value;198 unset( $menu_order[ $key ] ); 199 array_splice( $menu_order, $dashboard_index + 1, 0, $value ); 197 200 break; 198 201 } 199 202 } 200 203 201 if ( false === $dashboard_index || false === $sitekit_index ) {202 return $menu_order;203 }204 unset( $menu_order[ $sitekit_index ] );205 array_splice( $menu_order, $dashboard_index + 1, 0, $sitekit_value );206 204 return $menu_order; 207 205 } … … 293 291 294 292 if ( current_user_can( Permissions::VIEW_SPLASH ) ) { 293 $notification = $this->context->input()->filter( INPUT_GET, 'notification' ); 294 $panel = $this->context->input()->filter( INPUT_GET, 'panel' ); 295 295 296 wp_safe_redirect( 296 $this->context->admin_url( 'splash' ) 297 $this->context->admin_url( 298 'splash', 299 array_filter( 300 array( 301 'notification' => $notification, 302 'panel' => $panel, 303 ), 304 function ( $value ) { 305 return null !== $value && '' !== $value; 306 } 307 ) 308 ) 297 309 ); 298 310 exit; … … 317 329 318 330 if ( current_user_can( Permissions::VIEW_DASHBOARD ) ) { 331 $notification = $this->context->input()->filter( INPUT_GET, 'notification' ); 332 $panel = $this->context->input()->filter( INPUT_GET, 'panel' ); 333 319 334 wp_safe_redirect( 320 $this->context->admin_url() 335 $this->context->admin_url( 336 'dashboard', 337 array_filter( 338 array( 339 'notification' => $notification, 340 'panel' => $panel, 341 ), 342 function ( $value ) { 343 return null !== $value && '' !== $value; 344 } 345 ) 346 ) 321 347 ); 322 348 exit; … … 507 533 $context->admin_url( 508 534 'dashboard', 509 array( 510 // Pass through the notification parameter, or removes it if none. 511 'notification' => $context->input()->filter( INPUT_GET, 'notification' ), 535 array_filter( 536 array( 537 // Pass through supported params, or remove if none. 538 'notification' => $context->input()->filter( INPUT_GET, 'notification' ), 539 'panel' => $context->input()->filter( INPUT_GET, 'panel' ), 540 ), 541 function ( $value ) { 542 return null !== $value && '' !== $value; 543 } 512 544 ) 513 545 ) -
google-site-kit/trunk/includes/Core/Assets/Script.php
r3118692 r3479192 71 71 if ( $src ) { 72 72 $entry = Manifest::get( $this->handle ); 73 74 list( $filename, $hash ) = array( null, null ); 73 75 74 76 if ( is_array( $entry[0] ) ) { -
google-site-kit/trunk/includes/Core/Authentication/Authentication.php
r3397601 r3479192 313 313 314 314 $this->set_connected_proxy_url(); 315 }, 316 10, 317 3 315 } 318 316 ); 319 317 … … 1145 1143 <a 1146 1144 href="#" 1147 onclick=" clearSiteKitAppStorage()"1145 onclick="reauthenticateAndContinueSetup()" 1148 1146 ><?php esc_html_e( 'Click here', 'google-site-kit' ); ?></a> 1149 1147 </p> … … 1152 1150 sprintf( 1153 1151 " 1154 function clearSiteKitAppStorage() { 1155 if ( localStorage ) { 1156 localStorage.clear(); 1152 function reauthenticateAndContinueSetup() { 1153 const moduleSlug = getAbandonedModuleSlug(); 1154 1155 if ( moduleSlug ) { 1156 const redirect = '%3\$s&slug=' + moduleSlug; 1157 document.location = '%2\$s&redirect=' + encodeURIComponent( redirect ); 1158 } else { 1159 if ( localStorage ) { 1160 localStorage.clear(); 1161 } 1162 if ( sessionStorage ) { 1163 sessionStorage.clear(); 1164 } 1165 document.location = '%2\$s'; 1157 1166 } 1158 if ( sessionStorage ) { 1159 sessionStorage.clear(); 1167 } 1168 1169 function getAbandonedModuleSlug() { 1170 for ( const storage of [ localStorage, sessionStorage ] ) { 1171 if ( ! storage ) { 1172 continue; 1173 } 1174 const key = Object.keys( storage ).find( ( k ) => 1175 k.match( 'googlesitekit_%1\$s_.*_module_setup' ) 1176 ); 1177 if ( ! key ) { 1178 continue; 1179 } 1180 try { 1181 return JSON.parse( storage[ key ] )?.value; 1182 } catch ( _ ) {} 1160 1183 } 1161 document.location = '%s';1162 1184 } 1163 1185 ", 1164 esc_url_raw( $this->get_connect_url() ) 1186 GOOGLESITEKIT_VERSION, 1187 esc_url_raw( $this->get_connect_url() ), 1188 esc_url_raw( 1189 $this->context->admin_url( 1190 'dashboard', 1191 array( 1192 'reAuth' => 'true', 1193 ) 1194 ) 1195 ) 1165 1196 ) 1166 1197 ); -
google-site-kit/trunk/includes/Core/Authentication/Clients/Client_Factory.php
r3343017 r3479192 161 161 * @since 1.115.0 162 162 * 163 * @param $force_ip_resolve null|stringIP version to force. Default: null.163 * @param null|string $force_ip_resolve IP version to force. Default: null. 164 164 */ 165 165 $force_ip_resolve = apply_filters( 'googlesitekit_force_ip_resolve', null ); -
google-site-kit/trunk/includes/Core/Authentication/Disconnected_Reason.php
r3118692 r3479192 39 39 public function register() { 40 40 parent::register(); 41 add_action( 'googlesitekit_authorize_user', array( $this, 'delete' ) ); 41 // The delete method returns a boolean but actions expect a void return, so we ignore it here. 42 add_action( 'googlesitekit_authorize_user', array( $this, 'delete' ) ); // @phpstan-ignore return.void 42 43 } 43 44 } -
google-site-kit/trunk/includes/Core/Email_Reporting/Eligible_Subscribers_Query.php
r3438138 r3479192 123 123 */ 124 124 private function query_shared_roles( $excluded_user_ids ) { 125 $shared_roles = $this->modules->get_module_sharing_settings()->get_all_shared_roles(); 125 $sharing_settings = $this->modules->get_module_sharing_settings(); 126 127 $shared_roles = array_unique( 128 array_merge( 129 $sharing_settings->get_shared_roles( 'analytics-4' ), 130 $sharing_settings->get_shared_roles( 'search-console' ) 131 ) 132 ); 126 133 127 134 if ( empty( $shared_roles ) ) { … … 131 138 $query = new WP_User_Query( 132 139 array( 133 'role__in' => array_values( array_unique( $shared_roles )),140 'role__in' => array_values( $shared_roles ), 134 141 'number' => self::QUERY_LIMIT, 135 142 'count_total' => false, -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Assets.php
r3467940 r3479192 58 58 // subscription-confirmation assets. 59 59 'subscription-envelope-graphic' => '2026-02-20-subscription-envelope-graphic.png', 60 // error-email assets. 61 'warning-icon' => '2026-02-20-warning-icon.png', 60 62 ); 61 63 -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Log.php
r3467940 r3479192 82 82 83 83 /** 84 * Template type meta key. 85 * 86 * @since 1.174.0 87 */ 88 const META_TEMPLATE_TYPE = '_template_type'; 89 90 /** 84 91 * Email log post statuses. 85 92 * … … 91 98 const STATUS_FAILED = 'email_failed'; 92 99 const STATUS_SCHEDULED = 'email_scheduled'; 100 101 /** 102 * Email template types. 103 * 104 * @since 1.174.0 105 */ 106 const TEMPLATE_TYPE_EMAIL_REPORT = 'email-report'; 107 const TEMPLATE_TYPE_SUBSCRIBE_SUCCESS = 'subscribe-success'; 93 108 94 109 /** … … 353 368 ) 354 369 ); 370 371 register_post_meta( 372 self::POST_TYPE, 373 self::META_TEMPLATE_TYPE, 374 array( 375 'type' => 'string', 376 'single' => true, 377 'auth_callback' => $auth_callback, 378 'sanitize_callback' => array( __CLASS__, 'sanitize_template_type' ), 379 ) 380 ); 355 381 } 356 382 … … 483 509 public static function sanitize_site_id( $value ) { 484 510 return absint( $value ); 511 } 512 513 /** 514 * Sanitizes the template type meta value. 515 * 516 * @since 1.174.0 517 * 518 * @param mixed $value Meta value. 519 * @return string Sanitized template type. 520 */ 521 public static function sanitize_template_type( $value ) { 522 $value = sanitize_text_field( $value ); 523 524 $allowed = array( 525 self::TEMPLATE_TYPE_EMAIL_REPORT, 526 self::TEMPLATE_TYPE_SUBSCRIBE_SUCCESS, 527 ); 528 529 if ( in_array( $value, $allowed, true ) ) { 530 return $value; 531 } 532 533 return self::TEMPLATE_TYPE_EMAIL_REPORT; 485 534 } 486 535 -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Log_Batch_Query.php
r3467940 r3479192 310 310 } 311 311 312 return get_post_meta( $batch_post_ids[0], Email_Log::META_ERROR_DETAILS, true ); 312 $first_post_id = min( $batch_post_ids ); 313 return get_post_meta( $first_post_id, Email_Log::META_ERROR_DETAILS, true ); 313 314 } 314 315 } -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Log_Processor.php
r3457523 r3479192 102 102 } 103 103 104 $template_type = $this->get_template_type_from_log( $email_log ); 105 106 if ( Email_Log::TEMPLATE_TYPE_SUBSCRIBE_SUCCESS === $template_type ) { 107 $this->process_subscription_confirmation_log( $post_id, $user, $frequency ); 108 return; 109 } 110 104 111 $date_range = $this->get_date_range_for_log( $email_log ); 105 112 if ( is_wp_error( $date_range ) ) { … … 143 150 144 151 /** 152 * Processes a subscription confirmation log. 153 * 154 * @since 1.174.0 155 * 156 * @param int $post_id Email log post ID. 157 * @param WP_User $user Recipient user. 158 * @param string $frequency Frequency slug. 159 */ 160 private function process_subscription_confirmation_log( $post_id, WP_User $user, $frequency ) { 161 $template_data = $this->template_formatter->prepare_subscription_confirmation_template_data( $frequency ); 162 163 $send_result = $this->report_sender->send( 164 $user, 165 array(), 166 $template_data, 167 'subscription-confirmation' 168 ); 169 170 if ( is_wp_error( $send_result ) ) { 171 $this->mark_failed( $post_id, $send_result ); 172 return; 173 } 174 175 $this->mark_sent( $post_id ); 176 } 177 178 /** 145 179 * Retrieves a valid email log post. 146 180 * … … 162 196 163 197 return $email_log; 198 } 199 200 /** 201 * Gets the template type for an email log. 202 * 203 * @since 1.174.0 204 * 205 * @param WP_Post $email_log Email log post. 206 * @return string Template type. 207 */ 208 private function get_template_type_from_log( WP_Post $email_log ) { 209 $template_type = get_post_meta( $email_log->ID, Email_Log::META_TEMPLATE_TYPE, true ); 210 211 return Email_Log::sanitize_template_type( $template_type ); 164 212 } 165 213 -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Report_Sender.php
r3457523 r3479192 64 64 * @param array $sections_payload Sections payload. 65 65 * @param array $template_data Template data. 66 * @param string $template_name Optional. Template name. Default Email_Log::TEMPLATE_TYPE_EMAIL_REPORT. 66 67 * @return true|WP_Error True on success, WP_Error on failure. 67 68 */ 68 public function send( WP_User $user, $sections_payload, $template_data ) {69 public function send( WP_User $user, $sections_payload, $template_data, $template_name = Email_Log::TEMPLATE_TYPE_EMAIL_REPORT ) { 69 70 $renderer = $this->template_renderer_factory->create( $sections_payload ); 70 71 … … 73 74 } 74 75 75 $html_content = $this->render_template( $renderer, $template_data );76 $html_content = $this->render_template( $renderer, $template_data, $template_name ); 76 77 77 78 if ( is_wp_error( $html_content ) ) { … … 79 80 } 80 81 81 $text_content = $this->render_text_template( $renderer, $template_data );82 $text_content = $this->render_text_template( $renderer, $template_data, $template_name ); 82 83 83 84 if ( is_wp_error( $text_content ) ) { … … 113 114 * @param Email_Template_Renderer $renderer Template renderer instance. 114 115 * @param array $template_data Template data. 116 * @param string $template_name Template name. 115 117 * @return string|WP_Error Rendered HTML or WP_Error. 116 118 */ 117 private function render_template( Email_Template_Renderer $renderer, $template_data ) {118 $rendered = $renderer->render( 'email-report', $template_data );119 private function render_template( Email_Template_Renderer $renderer, $template_data, $template_name ) { 120 $rendered = $renderer->render( $template_name, $template_data ); 119 121 120 122 if ( is_wp_error( $rendered ) ) { … … 136 138 * @param Email_Template_Renderer $renderer Template renderer instance. 137 139 * @param array $template_data Template data. 140 * @param string $template_name Template name. 138 141 * @return string|WP_Error Rendered plain text or WP_Error. 139 142 */ 140 private function render_text_template( Email_Template_Renderer $renderer, $template_data ) {141 $rendered = $renderer->render_text( 'email-report', $template_data );143 private function render_text_template( Email_Template_Renderer $renderer, $template_data, $template_name ) { 144 $rendered = $renderer->render_text( $template_name, $template_data ); 142 145 143 146 if ( is_wp_error( $rendered ) ) { -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting.php
r3467940 r3479192 14 14 use Google\Site_Kit\Core\Email\Email; 15 15 use Google\Site_Kit\Core\Authentication\Authentication; 16 use Google\Site_Kit\Core\Golinks\Golinks; 16 17 use Google\Site_Kit\Core\Modules\Modules; 17 18 use Google\Site_Kit\Core\Storage\Options; … … 66 67 67 68 /** 69 * Golinks instance. 70 * 71 * @since 1.174.0 72 * @var Golinks 73 */ 74 protected $golinks; 75 76 /** 68 77 * Email_Reporting_Settings instance. 69 78 * … … 182 191 * @since 1.162.0 183 192 * @since 1.168.0 Added authentication dependency. 193 * @since 1.174.0 Added golinks dependency. 184 194 * 185 195 * @param Context $context Plugin context. 186 196 * @param Modules $modules Modules instance. 187 197 * @param Email_Reporting_Data_Requests $data_requests Email reporting data requests. 198 * @param Golinks $golinks Golinks instance. 188 199 * @param Authentication $authentication Authentication instance. 189 200 * @param Options|null $options Optional. Options instance. Default is a new instance. … … 194 205 Modules $modules, 195 206 Email_Reporting_Data_Requests $data_requests, 207 Golinks $golinks, 196 208 Authentication $authentication, 197 209 ?Options $options = null, … … 201 213 $this->modules = $modules; 202 214 $this->data_requests = $data_requests; 215 $this->golinks = $golinks; 203 216 $this->authentication = $authentication; 204 217 $this->options = $options ?: new Options( $this->context ); … … 214 227 $email_sender = new Email(); 215 228 $section_builder = new Email_Report_Section_Builder( $this->context ); 216 $template_formatter = new Email_Template_Formatter( $this->context, $section_builder );217 $template_renderer_factory = new Email_Template_Renderer_Factory( $this->context );229 $template_formatter = new Email_Template_Formatter( $this->context, $section_builder, $this->golinks ); 230 $template_renderer_factory = new Email_Template_Renderer_Factory( $this->context, $this->golinks ); 218 231 $report_sender = new Email_Report_Sender( $template_renderer_factory, $email_sender ); 219 232 $log_processor = new Email_Log_Processor( $this->email_log_batch_query, $this->data_requests, $template_formatter, $report_sender ); … … 224 237 $this->user_settings, 225 238 $eligible_subscribers_query, 226 $email_sender 239 $email_sender, 240 $this->golinks 227 241 ); 228 $this->email_log = new Email_Log( $this->context);242 $this->email_log = new Email_Log(); 229 243 $this->scheduler = new Email_Reporting_Scheduler( $frequency_planner ); 230 244 $this->initiator_task = new Initiator_Task( $this->scheduler, $this->subscribed_users_query ); … … 247 261 */ 248 262 public function register() { 263 $this->golinks->register_handler( 'manage-subscription-email-reporting', new Email_Reporting_Golink_Handler() ); 249 264 $this->settings->register(); 250 265 $this->rest_controller->register(); -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting_Data_Requests.php
r3457523 r3479192 38 38 class Email_Reporting_Data_Requests { 39 39 40 const PERMISSIONS_ERROR_STATUSES = array( 401, 403 ); 41 42 const PERMISSIONS_ERROR_REASONS = array( 43 'unauthorized', 44 'authError', 45 'expired', 46 'required', 47 'forbidden', 48 'insufficientPermissions', 49 'accountDeleted', 50 'accountDisabled', 51 'accessNotConfigured', 52 ); 53 40 54 /** 41 55 * Modules instance. … … 175 189 176 190 /** 191 * Categorizes a WP_Error based on its status and reason for better messaging in the front end. 192 * 193 * @since 1.174.0 194 * 195 * @param WP_Error $error The error to categorize. 196 * @param string $module_slug The module slug related to the error. 197 * @return WP_Error The categorized error with an added 'category' data field. 198 */ 199 public function categorize_error( WP_Error $error, $module_slug ) { 200 $status = $error->get_error_data()['status']; 201 $reason = $error->get_error_data()['reason']; 202 203 $category = 'report_error'; 204 if ( in_array( $status, self::PERMISSIONS_ERROR_STATUSES, true ) || in_array( $reason, self::PERMISSIONS_ERROR_REASONS, true ) ) { 205 $category = 'permissions_error'; 206 } 207 208 return new WP_Error( 209 $error->get_error_code(), 210 $error->get_error_message(), 211 array_merge( 212 $error->get_error_data(), 213 array( 214 'category_id' => $category, 215 'module_slug' => $module_slug, 216 ) 217 ) 218 ); 219 } 220 221 /** 177 222 * Gets active module slugs for email reporting. 178 223 * … … 204 249 205 250 if ( is_wp_error( $shared_payload ) ) { 206 return $ shared_payload;251 return $this->categorize_error( $shared_payload, $slug ); 207 252 } 208 253 … … 223 268 224 269 if ( is_wp_error( $result ) ) { 225 return $ result;270 return $this->categorize_error( $result, $slug ); 226 271 } 227 272 -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting_Pointer.php
r3457523 r3479192 176 176 'buttons' => sprintf( 177 177 '<a class="googlesitekit-pointer-cta button-primary" data-action="dismiss" href="%s">%s</a>', 178 $this->context->admin_url( 'dashboard', array( ' email-reporting-panel' => 1) ),178 $this->context->admin_url( 'dashboard', array( 'panel' => 'email-reporting' ) ), 179 179 esc_html__( 'Set up', 'google-site-kit' ) 180 180 ), -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php
r3420533 r3479192 164 164 165 165 /** 166 * Schedules subscription confirmation delivery via existing worker and fallback pipeline. 167 * 168 * @since 1.174.0 169 * 170 * @param int $user_id User ID. 171 * @param array $previous_settings Previous settings. 172 * @param array $updated_settings Updated settings. 173 * @return true|\WP_Error True on success, WP_Error on failure. 174 */ 175 public function schedule_email_confirmation( $user_id, array $previous_settings, array $updated_settings ) { 176 $task = new Subscription_Confirmation_Task( $this->frequency_planner ); 177 $batch = $task->maybe_schedule( 178 $user_id, 179 $previous_settings, 180 $updated_settings 181 ); 182 183 if ( false === $batch ) { 184 return true; 185 } 186 187 if ( is_wp_error( $batch ) ) { 188 return $batch; 189 } 190 191 if ( empty( $batch['batch_id'] ) || empty( $batch['frequency'] ) || ! isset( $batch['timestamp'] ) ) { 192 return new \WP_Error( 193 'email_reporting_invalid_confirmation_batch', 194 __( 'Subscription confirmation batch payload is invalid.', 'google-site-kit' ), 195 array( 'status' => 500 ) 196 ); 197 } 198 199 $batch_id = (string) $batch['batch_id']; 200 $frequency = (string) $batch['frequency']; 201 $timestamp = (int) $batch['timestamp']; 202 203 $this->schedule_worker( $batch_id, $frequency, $timestamp, 0 ); 204 $this->schedule_fallback( $batch_id, $frequency, $timestamp, 0 ); 205 206 return true; 207 } 208 209 /** 166 210 * Unschedules all email reporting related events. 167 211 * -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Template_Formatter.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 use Google\Site_Kit\Core\User\Email_Reporting_Settings; 15 16 use WP_Error; … … 45 46 46 47 /** 48 * Golinks instance. 49 * 50 * @since 1.174.0 51 * 52 * @var Golinks 53 */ 54 private $golinks; 55 56 /** 47 57 * Constructor. 48 58 * 49 59 * @since 1.170.0 60 * @since 1.174.0 Added golinks dependency. 50 61 * 51 62 * @param Context $context Plugin context. 52 63 * @param Email_Report_Section_Builder $section_builder Section builder instance. 53 */ 54 public function __construct( Context $context, Email_Report_Section_Builder $section_builder ) { 64 * @param Golinks $golinks Golinks instance. 65 */ 66 public function __construct( Context $context, Email_Report_Section_Builder $section_builder, Golinks $golinks ) { 55 67 $this->context = $context; 56 68 $this->section_builder = $section_builder; 69 $this->golinks = $golinks; 57 70 } 58 71 … … 123 136 } 124 137 125 $sections_map = new Sections_Map( $this->context, $sections_payload );138 $sections_map = new Sections_Map( $this->context, $sections_payload, $this->golinks ); 126 139 if ( empty( $sections_map->get_sections() ) ) { 127 140 return new WP_Error( … … 299 312 */ 300 313 public function prepare_simple_email_data( $subject, $preheader, $email_data = array() ) { 301 $site_domain = $this->get_site_domain(); 314 $site_domain = $this->get_site_domain(); 315 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 316 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 317 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 302 318 303 319 $data = array( … … 311 327 'primary_call_to_action' => array( 312 328 'label' => $email_data['cta_label'] ?? __( 'Get your report', 'google-site-kit' ), 313 'url' => $email_data['cta_url'] ?? admin_url( 'admin.php?page=googlesitekit-dashboard' ),329 'url' => $email_data['cta_url'] ?? $dashboard_url, 314 330 ), 315 331 'footer' => array( 316 'copy' => $email_data['footer_copy'] ?? '', 332 'copy' => $email_data['footer_copy'] ?? '', 333 'unsubscribe_url' => $email_settings_url, 334 'links' => array( 335 array( 336 'label' => __( 'Manage subscription', 'google-site-kit' ), 337 'url' => $email_settings_url, 338 ), 339 array( 340 'label' => __( 'Privacy Policy', 'google-site-kit' ), 341 'url' => 'https://policies.google.com/privacy', 342 ), 343 array( 344 'label' => __( 'Help center', 'google-site-kit' ), 345 'url' => $help_center_url, 346 ), 347 ), 317 348 ), 318 349 ); 319 350 320 351 return $data; 352 } 353 354 /** 355 * Builds template data for the subscription confirmation email. 356 * 357 * @since 1.174.0 358 * 359 * @param string $frequency Frequency slug. 360 * @return array Template data. 361 */ 362 public function prepare_subscription_confirmation_template_data( $frequency ) { 363 $site_domain = $this->get_site_domain(); 364 $frequency_label = $this->get_frequency_label( $frequency ); 365 $first_report_date = $this->get_first_report_date_label( $frequency ); 366 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 367 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 368 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 369 370 return array( 371 'subject' => sprintf( 372 /* translators: %s: Site domain. */ 373 __( 'Success! You’re subscribed to Site Kit reports for %s', 'google-site-kit' ), 374 $site_domain 375 ), 376 'preheader' => __( 'Your subscription is confirmed and your first report is on the way.', 'google-site-kit' ), 377 'site' => array( 378 'domain' => $site_domain, 379 'url' => $this->context->get_reference_site_url(), 380 ), 381 'title' => Content_Map::get_title( 'subscription-confirmation' ), 382 'body' => Content_Map::get_body_with_args( 383 'subscription-confirmation', 384 array( 385 $frequency_label, 386 $first_report_date, 387 ) 388 ), 389 'learn_more_url' => 'https://sitekit.withgoogle.com/documentation/email-reports/', 390 'primary_call_to_action' => array( 391 'label' => __( 'View dashboard', 'google-site-kit' ), 392 'url' => $dashboard_url, 393 ), 394 'footer' => array( 395 'copy' => __( 'You received this email because you signed up to receive email reports from Site Kit. If you do not want to receive these emails in the future you can unsubscribe', 'google-site-kit' ), 396 'unsubscribe_url' => $email_settings_url, 397 'links' => array( 398 array( 399 'label' => __( 'Manage subscription', 'google-site-kit' ), 400 'url' => $email_settings_url, 401 ), 402 array( 403 'label' => __( 'Privacy Policy', 'google-site-kit' ), 404 'url' => 'https://policies.google.com/privacy', 405 ), 406 array( 407 'label' => __( 'Help center', 'google-site-kit' ), 408 'url' => $help_center_url, 409 ), 410 ), 411 ), 412 ); 321 413 } 322 414 … … 331 423 */ 332 424 private function prepare_template_data( $frequency, $date_range ) { 425 $dashboard_url = $this->golinks->get_url( 'dashboard' ); 426 $email_settings_url = $this->golinks->get_url( 'manage-subscription-email-reporting' ); 427 $help_center_url = add_query_arg( 'doc', 'get-support', 'https://sitekit.withgoogle.com/support/' ); 428 333 429 return array( 334 430 'subject' => $this->build_subject( $frequency ), … … 344 440 'primary_call_to_action' => array( 345 441 'label' => __( 'View dashboard', 'google-site-kit' ), 346 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard' ),442 'url' => $dashboard_url, 347 443 ), 348 444 'footer' => array( 349 445 'copy' => __( 'You received this email because you signed up to receive email reports from Site Kit. If you do not want to receive these emails in the future you can unsubscribe', 'google-site-kit' ), // The space and unsubscribe link are handled in the template. 350 'unsubscribe_url' => admin_url( 'admin.php?page=googlesitekit-settings#/admin-settings' ),446 'unsubscribe_url' => $email_settings_url, 351 447 'links' => array( 352 448 array( 353 449 'label' => __( 'Manage subscription', 'google-site-kit' ), 354 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard&email-reporting-panel=1' ),450 'url' => $email_settings_url, 355 451 ), 356 452 array( … … 360 456 array( 361 457 'label' => __( 'Help center', 'google-site-kit' ), 362 'url' => 'https://sitekit.withgoogle.com/documentation/troubleshooting/site-kit-support/',458 'url' => $help_center_url, 363 459 ), 364 460 ), -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Template_Renderer.php
r3467940 r3479192 160 160 // Handle simple email templates (invitation-email, subscription-confirmation, etc.). 161 161 if ( 'email-report' !== $template_name ) { 162 if ( empty( $data['body'] ) ) {163 $data['body'] = Body_Content_Map::get_body( $template_name );164 }165 166 162 return Plain_Text_Formatter::format_simple_email( $data ); 167 163 } -
google-site-kit/trunk/includes/Core/Email_Reporting/Email_Template_Renderer_Factory.php
r3438138 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 15 16 /** … … 32 33 33 34 /** 35 * Golinks instance. 36 * 37 * @since 1.174.0 38 * 39 * @var Golinks 40 */ 41 private $golinks; 42 43 /** 34 44 * Constructor. 35 45 * 36 46 * @since 1.170.0 47 * @since 1.174.0 Added golinks dependency. 37 48 * 38 49 * @param Context $context Plugin context. 50 * @param Golinks $golinks Golinks instance. 39 51 */ 40 public function __construct( Context $context ) {52 public function __construct( Context $context, Golinks $golinks ) { 41 53 $this->context = $context; 54 $this->golinks = $golinks; 42 55 } 43 56 … … 51 64 */ 52 65 public function create( array $sections_payload ) { 53 return new Email_Template_Renderer( new Sections_Map( $this->context, $sections_payload ) );66 return new Email_Template_Renderer( new Sections_Map( $this->context, $sections_payload, $this->golinks ) ); 54 67 } 55 68 } -
google-site-kit/trunk/includes/Core/Email_Reporting/Initiator_Task.php
r3457523 r3479192 66 66 $user_ids = $this->subscribed_users_query->for_frequency( $frequency ); 67 67 68 $reference_dates = $this->build_reference_dates( $frequency, $timestamp );68 $reference_dates = self::build_reference_dates( $frequency, $timestamp ); 69 69 70 70 foreach ( $user_ids as $user_id ) { … … 81 81 Email_Log::META_SEND_ATTEMPTS => 0, 82 82 Email_Log::META_SITE_ID => get_current_blog_id(), 83 Email_Log::META_TEMPLATE_TYPE => Email_Log::TEMPLATE_TYPE_EMAIL_REPORT, 83 84 ), 84 85 ) … … 93 94 * Builds the report reference dates for a batch. 94 95 * 96 * @since 1.167.0 97 * @since 1.174.0 Made method static. 98 * 95 99 * @param string $frequency Frequency slug. 96 100 * @param int $timestamp Base timestamp. 97 101 * @return array Reference date payload. 98 102 */ 99 p rivatefunction build_reference_dates( $frequency, $timestamp ) {103 public static function build_reference_dates( $frequency, $timestamp ) { 100 104 $time_zone = wp_timezone(); 101 105 $send_date = ( new DateTimeImmutable( '@' . $timestamp ) ) -
google-site-kit/trunk/includes/Core/Email_Reporting/Plain_Text_Formatter.php
r3467940 r3479192 45 45 * 46 46 * Simple emails share a common structure with customizable content. 47 * The preheader is used as the main message body in plain text format.48 47 * 49 48 * @since 1.173.0 50 49 * 51 * @param array $data The simple email data containing site, preheader, learn_more_url,52 * primary_call_to_action, and footer.50 * @param array $data The simple email data containing site, title, learn_more_url, 51 * primary_call_to_action, body, and footer. 53 52 * @return string Formatted plain text email. 54 53 */ 55 54 public static function format_simple_email( $data ) { 56 55 $site_domain = $data['site']['domain'] ?? ''; 57 $ preheader = $data['preheader'] ?? '';56 $title = wp_strip_all_tags( $data['title'] ?? '' ); 58 57 $learn_more_url = $data['learn_more_url'] ?? ''; 59 58 $cta = $data['primary_call_to_action'] ?? array(); … … 66 65 $site_domain, 67 66 '', 68 $preheader,69 '',70 67 ); 68 69 // Title. 70 if ( ! empty( $title ) ) { 71 $lines[] = $title; 72 $lines[] = ''; 73 } 71 74 72 75 // Body paragraphs (strip any HTML tags for plain text output). … … 91 94 $lines[] = ''; 92 95 } 96 97 $lines[] = str_repeat( '-', 50 ); 98 $lines[] = ''; 93 99 94 100 // Footer copy. -
google-site-kit/trunk/includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Core\Email\Email; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 use Google\Site_Kit\Core\Modules\Modules; 15 16 use Google\Site_Kit\Core\Permissions\Permissions; … … 97 98 98 99 /** 100 * Golinks instance. 101 * 102 * @since 1.174.0 103 * @var Golinks 104 */ 105 private $golinks; 106 107 /** 99 108 * Constructor. 100 109 * … … 102 111 * @since 1.170.0 Added modules and user email reporting settings dependencies. 103 112 * @since 1.173.0 Added eligible subscribers query and email sender dependencies and removed unused user options dependency. 113 * @since 1.174.0 Added golinks dependency. 104 114 * 105 115 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. … … 108 118 * @param Eligible_Subscribers_Query $eligible_subscribers_query Eligible subscribers query instance. 109 119 * @param Email $email_sender Email sender instance. 120 * @param Golinks $golinks Golinks instance. 110 121 */ 111 122 public function __construct( … … 114 125 User_Email_Reporting_Settings $user_email_reporting_settings, 115 126 Eligible_Subscribers_Query $eligible_subscribers_query, 116 Email $email_sender 127 Email $email_sender, 128 Golinks $golinks 117 129 ) { 118 130 $this->settings = $settings; … … 122 134 $this->email_log_batch_query = new Email_Log_Batch_Query(); 123 135 $this->email_sender = $email_sender; 136 $this->golinks = $golinks; 124 137 } 125 138 … … 382 395 'role' => $this->get_primary_role( $user ), 383 396 'subscribed' => is_array( $settings ) && ! empty( $settings['subscribed'] ), 397 'invited' => $this->is_invite_rate_limited( $user->ID ), 384 398 ); 385 399 } … … 509 523 'url' => home_url( '/' ), 510 524 ), 511 'body' => Body_Content_Map::get_body( 'invitation-email' ), 525 'title' => Content_Map::get_title_with_args( 'invitation-email', array( $inviter_email ) ), 526 'body' => Content_Map::get_body( 'invitation-email' ), 512 527 'inviter_email' => $inviter_email, 513 528 'learn_more_url' => 'https://sitekit.withgoogle.com/documentation/email-reports/', 514 529 'primary_call_to_action' => array( 515 530 'label' => __( 'Get your report', 'google-site-kit' ), 516 'url' => admin_url( 'admin.php?page=googlesitekit-dashboard' ),531 'url' => $this->golinks->get_url( 'manage-subscription-email-reporting' ), 517 532 ), 518 533 'footer' => array( -
google-site-kit/trunk/includes/Core/Email_Reporting/Sections_Map.php
r3467940 r3479192 12 12 13 13 use Google\Site_Kit\Context; 14 use Google\Site_Kit\Core\Golinks\Golinks; 14 15 15 16 /** … … 70 71 71 72 /** 73 * Golinks instance. 74 * 75 * @since 1.174.0 76 * @var Golinks 77 */ 78 protected $golinks; 79 80 /** 72 81 * Constructor. 73 82 * 74 83 * @since 1.168.0 84 * @since 1.174.0 Added golinks dependency. 75 85 * 76 86 * @param Context $context Plugin context. 77 87 * @param array $payload The payload data to be used in sections. 78 */ 79 public function __construct( Context $context, $payload ) { 88 * @param Golinks $golinks Golinks instance. 89 */ 90 public function __construct( Context $context, $payload, Golinks $golinks ) { 80 91 $this->context = $context; 81 92 $this->payload = $payload; 93 $this->golinks = $golinks; 94 } 95 96 /** 97 * Gets the dashboard golink URL. 98 * 99 * @since 1.174.0 100 * 101 * @return string Dashboard URL. 102 */ 103 protected function get_dashboard_url() { 104 return $this->golinks->get_url( 'dashboard' ); 82 105 } 83 106 … … 156 179 'icon' => 'conversions', 157 180 'section_template' => 'section-conversions', 158 'dashboard_url' => $this-> context->admin_url( 'dashboard'),181 'dashboard_url' => $this->get_dashboard_url(), 159 182 'section_parts' => $section_parts, 160 183 ), … … 215 238 'icon' => 'visitors', 216 239 'section_template' => 'section-metrics', 217 'dashboard_url' => $this-> context->admin_url( 'dashboard'),240 'dashboard_url' => $this->get_dashboard_url(), 218 241 'section_parts' => $section_parts, 219 242 ), … … 248 271 'icon' => 'search', 249 272 'section_template' => 'section-page-metrics', 250 'dashboard_url' => $this-> context->admin_url( 'dashboard'),273 'dashboard_url' => $this->get_dashboard_url(), 251 274 'section_parts' => $section_parts, 252 275 ), … … 287 310 'icon' => 'views', 288 311 'section_template' => 'section-page-metrics', 289 'dashboard_url' => $this-> context->admin_url( 'dashboard'),312 'dashboard_url' => $this->get_dashboard_url(), 290 313 'section_parts' => $section_parts, 291 314 ), … … 320 343 'icon' => 'growth', 321 344 'section_template' => 'section-page-metrics', 322 'dashboard_url' => $this-> context->admin_url( 'dashboard'),345 'dashboard_url' => $this->get_dashboard_url(), 323 346 'section_parts' => $section_parts, 324 347 ), -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/email-report/parts/header.php
r3467940 r3479192 23 23 <tr> 24 24 <td style="vertical-align:top;" width="79"> 25 <img src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr__( 'Site Kit by Google', 'google-site-kit' ); ?>" width="79" height="22" style="display:block; margin-top: 12px;" />25 <img src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr__( 'Site Kit by Google', 'google-site-kit' ); ?>" width="79" height="22" style="display:block; margin-top: 8px;" /> 26 26 </td> 27 27 <?php /* Extra centering for Outlook. */ ?> 28 28 <td style="vertical-align:top; text-align:center;" align="center"> 29 29 <center> 30 <img src="<?php echo esc_url( $shooting_stars_url ); ?>" alt="" width="107" height="56" style="display:block; margin: 24px auto 0 auto;" align="center" />30 <img src="<?php echo esc_url( $shooting_stars_url ); ?>" alt="" width="107" height="56" style="display:block; margin: 12px auto 0 auto;" align="center" /> 31 31 </center> 32 32 </td> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions-metric-part.php
r3467940 r3479192 54 54 ?> 55 55 </td> 56 <td width="110" 57 style="font-size:12px; font-weight:500; color:#6C726E; text-align: right; width: 110px; padding-bottom: 10px;"> 56 <td class="subtitle" width="110" style="font-size:12px; font-weight:500; color:#6C726E; text-align: right; width: 110px; padding-bottom: 10px;"> 58 57 <?php echo esc_html( $change_context ); ?> 59 58 </td> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-conversions.php
r3467940 r3479192 43 43 <?php echo esc_html( $section_parts['total_conversion_events']['data']['label'] ); ?> 44 44 </td> 45 <td width="110" style="font-size:12px; line-height:16px; font-weight:500; color:#6C726E; text-align: right; width: 110px;">45 <td class="subtitle" width="110" style="font-size:12px; line-height:16px; font-weight:500; color:#6C726E; text-align: right; width: 110px;"> 46 46 <?php echo esc_html( $section_parts['total_conversion_events']['data']['change_context'] ); ?> 47 47 </td> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php
r3467940 r3479192 44 44 <tr> 45 45 <td> </td> 46 <td width="110" 47 style="text-align: right; font-size:12px; line-height:16px; font-weight:500; color:#6C726E; width: 110px;"> 46 <td class="subtitle" width="110" style="text-align: right; font-size:12px; line-height:16px; font-weight:500; color:#6C726E; width: 110px;"> 48 47 <?php echo esc_html( $subtitle ); ?> 49 48 </td> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/email-report/template.php
r3467940 r3479192 20 20 $preheader = $data['preheader']; 21 21 $site_domain = $data['site']['domain']; 22 $site_url = $data['site']['url'];22 $site_url = ! empty( $data['site']['url'] ) ? $data['site']['url'] : ''; 23 23 $date_label = $data['date_range']['label']; 24 24 $primary_cta = $data['primary_call_to_action']; … … 110 110 overflow: hidden; 111 111 } 112 113 @media (min-width: 481px) { 114 .subtitle { 115 /* `!important` used to override inline styles in the element. */ 116 width: auto !important; 117 } 118 } 112 119 </style> 113 120 </head> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/invitation-email/template.php
r3467940 r3479192 18 18 $site_domain = $data['site']['domain']; 19 19 $site_url = $data['site']['url']; 20 $email_title = $data['title']; 20 21 $body = $data['body']; 21 22 $inviter_email = $data['inviter_email']; … … 143 144 </p> 144 145 145 <?php /* Invitation title. */ ?>146 <?php /* Title from Content_Map with inviter email link. */ ?> 146 147 <h1 style="font-size: 22px; line-height: 28px; font-weight: 500; color: #161B18; margin: 0 0 16px 0;"> 147 148 <?php 148 printf( 149 /* translators: %s: Email address of the person who sent the invitation (wrapped in mailto link) */ 150 esc_html__( '%s invited you to receive periodic performance reports', 'google-site-kit' ), 151 /* Mailto link styled to match title text as inline styles prevent email clients from auto-styling the email address as a blue link. */ 152 '<a href="mailto:' . esc_attr( $inviter_email ) . '" style="color: #161B18; text-decoration: none; font-weight: 500;">' . esc_html( $inviter_email ) . '</a>' 153 ); 149 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Contains pre-escaped mailto link. 150 echo $email_title; 154 151 ?> 155 152 </h1> 156 153 157 <?php /* Body paragraphs from Body_Content_Map. */ ?>154 <?php /* Body paragraphs from Content_Map. */ ?> 158 155 <?php foreach ( $body as $index => $paragraph ) : ?> 159 156 <p style="font-size: 14px; line-height: 20px; font-weight: 400; color: #161B18; margin: 0 0 16px 0;"> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/subscription-confirmation/parts/content.php
r3467940 r3479192 13 13 * @var string $site_domain The site domain. 14 14 * @var string $site_url The full site URL with protocol. 15 * @var string $title The email title. 15 16 * @var array $body Body paragraphs (may contain HTML). 16 17 * @var array $cta Primary CTA configuration with 'url' and 'label'. … … 38 39 </p> 39 40 40 <?php /* Title . */ ?>41 <?php /* Title from Content_Map. */ ?> 41 42 <h1 style="font-size: 22px; line-height: 28px; font-weight: 500; color: #161B18; margin: 0 0 16px 0;"> 42 <?php echo esc_html __( 'Success! You’re subscribed to Site Kit reports', 'google-site-kit'); ?>43 <?php echo esc_html( $title ); ?> 43 44 </h1> 44 45 45 <?php /* Body paragraphs from Body_Content_Map. */ ?>46 <?php /* Body paragraphs from Content_Map. */ ?> 46 47 <?php foreach ( $body as $paragraph ) : ?> 47 48 <p style="font-size: 14px; line-height: 20px; font-weight: 400; color: #161B18; margin: 0 0 16px 0;"> -
google-site-kit/trunk/includes/Core/Email_Reporting/templates/subscription-confirmation/template.php
r3467940 r3479192 18 18 $site_domain = $data['site']['domain']; 19 19 $site_url = $data['site']['url']; 20 $email_title = $data['title']; 20 21 $body = $data['body']; 21 22 $cta = $data['primary_call_to_action']; … … 138 139 'site_domain' => $site_domain, 139 140 'site_url' => $site_url, 141 'title' => $email_title, 140 142 'body' => $body, 141 143 'cta' => $cta, -
google-site-kit/trunk/includes/Core/Modules/Module_With_Owner.php
r3118692 r3479192 10 10 11 11 namespace Google\Site_Kit\Core\Modules; 12 13 use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client; 12 14 13 15 /** … … 28 30 */ 29 31 public function get_owner_id(); 32 33 /** 34 * Gets the OAuth_Client instance for the module owner. 35 * 36 * @since 1.174.0 37 * 38 * @return OAuth_Client OAuth_Client instance. 39 */ 40 public function get_owner_oauth_client(); 30 41 } -
google-site-kit/trunk/includes/Core/Permissions/Permissions.php
r3349867 r3479192 392 392 */ 393 393 private function check_dashboard_sharing_capability( $cap, $user_id, $args ) { 394 if ( isset( $args[0] ) ) { 395 $module_slug = $args[0]; 396 } 394 $module_slug = $args[0] ?? ''; 397 395 398 396 switch ( $cap ) { -
google-site-kit/trunk/includes/Core/Storage/Encrypted_User_Options.php
r2466816 r3479192 127 127 * 128 128 * @since 1.4.0 129 * @since 1.174.0 Returns callable to restore previous user. 129 130 * 130 131 * @param int $user_id User ID. 132 * @return callable A closure to switch back to the original user. 131 133 */ 132 134 public function switch_user( $user_id ) { 133 $this->user_options->switch_user( $user_id );135 return $this->user_options->switch_user( $user_id ); 134 136 } 135 137 } -
google-site-kit/trunk/includes/Core/User/Email_Reporting.php
r3389193 r3479192 11 11 namespace Google\Site_Kit\Core\User; 12 12 13 use Google\Site_Kit\Core\Email_Reporting\Email_Reporting_Scheduler; 14 use Google\Site_Kit\Core\Email_Reporting\Frequency_Planner; 13 15 use Google\Site_Kit\Core\Storage\User_Options; 14 16 … … 46 48 */ 47 49 public function __construct( User_Options $user_options ) { 50 $frequency_planner = new Frequency_Planner(); 51 $scheduler = new Email_Reporting_Scheduler( $frequency_planner ); 52 48 53 $this->email_reporting_settings = new Email_Reporting_Settings( $user_options ); 49 $this->rest_controller = new REST_Email_Reporting_Controller( $this->email_reporting_settings ); 54 $this->rest_controller = new REST_Email_Reporting_Controller( 55 $this->email_reporting_settings, 56 $scheduler 57 ); 50 58 } 51 59 -
google-site-kit/trunk/includes/Core/User/REST_Email_Reporting_Controller.php
r3397601 r3479192 11 11 namespace Google\Site_Kit\Core\User; 12 12 13 use Google\Site_Kit\Core\Email_Reporting\Email_Reporting_Scheduler; 13 14 use Google\Site_Kit\Core\Permissions\Permissions; 14 15 use Google\Site_Kit\Core\REST_API\REST_Route; … … 36 37 37 38 /** 39 * Email reporting scheduler instance. 40 * 41 * @since 1.174.0 42 * @var Email_Reporting_Scheduler 43 */ 44 private $scheduler; 45 46 /** 38 47 * Constructor. 39 48 * 40 49 * @since 1.162.0 41 50 * 42 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. 51 * @param Email_Reporting_Settings $settings Email_Reporting_Settings instance. 52 * @param Email_Reporting_Scheduler $scheduler Scheduler instance. 43 53 */ 44 public function __construct( Email_Reporting_Settings $settings ) { 45 $this->settings = $settings; 54 public function __construct( Email_Reporting_Settings $settings, Email_Reporting_Scheduler $scheduler ) { 55 $this->settings = $settings; 56 $this->scheduler = $scheduler; 46 57 } 47 58 … … 98 109 'methods' => WP_REST_Server::EDITABLE, 99 110 'callback' => function ( WP_REST_Request $request ) { 111 $previous_settings = $this->settings->get(); 100 112 $settings = $request['data']['settings']; 101 113 102 114 $this->settings->merge( $settings ); 103 115 104 return new WP_REST_Response( $this->settings->get() ); 116 $updated_settings = $this->settings->get(); 117 118 $scheduling_error = $this->scheduler->schedule_email_confirmation( 119 get_current_user_id(), 120 $previous_settings, 121 $updated_settings 122 ); 123 124 if ( is_wp_error( $scheduling_error ) ) { 125 return $scheduling_error; 126 } 127 128 return new WP_REST_Response( $updated_settings ); 105 129 }, 106 130 'permission_callback' => $can_view_dashboard, -
google-site-kit/trunk/includes/Core/User_Input/Site_Specific_Answers.php
r3118692 r3479192 103 103 $valid_values['values'] = $valid_answers; 104 104 105 if ( ! empty( $valid_values ) ) { 106 $results[ $setting_key ] = $valid_values; 107 } 105 $results[ $setting_key ] = $valid_values; 108 106 } 109 107 -
google-site-kit/trunk/includes/Core/User_Input/User_Specific_Answers.php
r3118692 r3479192 102 102 $valid_values['values'] = $valid_answers; 103 103 104 if ( ! empty( $valid_values ) ) { 105 $results[ $setting_key ] = $valid_values; 106 } 104 $results[ $setting_key ] = $valid_values; 107 105 } 108 106 -
google-site-kit/trunk/includes/Core/Util/BC_Functions.php
r3447448 r3479192 19 19 * @access private 20 20 * @ignore 21 * 22 * @method static void wp_print_script_tag( $attributes ) 23 * @method static void wp_print_inline_script_tag( $javascript, $attributes = array() ) 24 * @method static bool array_is_list( array $value ) 21 25 */ 22 26 class BC_Functions { -
google-site-kit/trunk/includes/Core/Util/Entity_Factory.php
r3148853 r3479192 266 266 // See WordPress's `get_the_archive_title()` function for this behavior. The strings here intentionally omit 267 267 // the 'google-site-kit' text domain since they should use WordPress core translations. 268 $title = $term->name; 269 268 270 switch ( $term->taxonomy ) { 269 271 case 'category': 270 $title = $term->name;271 272 $prefix = _x( 'Category:', 'category archive title prefix', 'default' ); 272 273 break; 273 274 case 'post_tag': 274 $title = $term->name;275 275 $prefix = _x( 'Tag:', 'tag archive title prefix', 'default' ); 276 276 break; … … 309 309 default: 310 310 $tax = get_taxonomy( $term->taxonomy ); 311 $title = $term->name;312 311 $prefix = sprintf( 313 312 /* translators: %s: Taxonomy singular name. */ -
google-site-kit/trunk/includes/Core/Util/URL.php
r3148853 r3479192 10 10 11 11 namespace Google\Site_Kit\Core\Util; 12 13 use Exception; 12 14 13 15 /** … … 69 71 } 70 72 71 return _get_component_from_parsed_url_array( $parts, $component ); 73 return _get_component_from_parsed_url_array( $parts, $component ); // @phpstan-ignore function.internal 72 74 } 73 75 -
google-site-kit/trunk/includes/Modules/Analytics_4.php
r3457523 r3479192 940 940 * @since 1.1.0 941 941 * 942 * @param $disabled boolWhether to disable tracking or not.942 * @param bool $disabled Whether to disable tracking or not. 943 943 */ 944 944 return (bool) apply_filters( 'googlesitekit_analytics_tracking_disabled', $disabled ); … … 2428 2428 ); 2429 2429 } 2430 return array(); 2430 2431 } 2431 2432 -
google-site-kit/trunk/includes/Modules/Analytics_4/Audience_Utilities.php
r3457523 r3479192 198 198 */ 199 199 private function get_audience_type( $audience_slug ) { 200 if ( ! $audience_slug ) {201 return 'USER_AUDIENCE';202 }203 204 200 switch ( $audience_slug ) { 205 201 case 'all-users': … … 210 206 return 'SITE_KIT_AUDIENCE'; 211 207 } 208 209 return 'USER_AUDIENCE'; 212 210 } 213 211 -
google-site-kit/trunk/includes/Modules/Analytics_4/Synchronize_AdSenseLinked.php
r3118692 r3479192 14 14 use Google\Site_Kit\Core\Storage\Options; 15 15 use Google\Site_Kit\Core\Storage\User_Options; 16 use Google\Site_Kit\Modules\Ad sense;16 use Google\Site_Kit\Modules\AdSense; 17 17 use Google\Site_Kit\Modules\Analytics_4; 18 use Google\Site_Kit\Modules\AdSense\Settings as Ad sense_Settings;18 use Google\Site_Kit\Modules\AdSense\Settings as AdSense_Settings; 19 19 20 20 /** … … 82 82 83 83 /** 84 * Cron callback for synchronizing the adsense linked data.84 * Cron callback for synchronizing the AdSense linked data. 85 85 * 86 86 * @since 1.123.0 -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager.php
r3467940 r3479192 46 46 use Google\Site_Kit\Core\Tracking\Provides_Feature_Metrics; 47 47 use Google\Site_Kit\Core\Util\Block_Support; 48 use Google\Site_Kit\Core\Util\Feature_Flags;49 48 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 50 49 use Google\Site_Kit\Core\Util\URL; … … 220 219 } 221 220 222 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) { 223 foreach ( self::POLICY_VIOLATION_NOTIFICATIONS as $notification ) { 224 $dismissed_items->remove( $notification ); 225 } 221 foreach ( self::POLICY_VIOLATION_NOTIFICATIONS as $notification ) { 222 $dismissed_items->remove( $notification ); 226 223 } 227 224 } … … 817 814 } 818 815 819 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) &&isset( $settings['contentPolicyStatus'] ) ) {816 if ( isset( $settings['contentPolicyStatus'] ) ) { 820 817 $content_policy_status = (array) $settings['contentPolicyStatus']; 821 818 $content_policy_state = $content_policy_status['contentPolicyState'] ?? ''; -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php
r3253534 r3479192 75 75 } 76 76 77 add_action( 78 'bulk_edit_custom_box', 79 array( $this, 'bulk_edit_field' ), 80 10, 81 2 82 ); 83 77 add_action( 'bulk_edit_custom_box', array( $this, 'bulk_edit_field' ) ); 84 78 add_action( 'save_post', array( $this, 'save_field' ) ); 85 79 } -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Settings.php
r3447448 r3479192 16 16 use Google\Site_Kit\Core\Storage\Setting_With_ViewOnly_Keys_Interface; 17 17 use Google\Site_Kit\Core\Util\BC_Functions; 18 use Google\Site_Kit\Core\Util\Feature_Flags;19 18 use Google\Site_Kit\Core\Util\Method_Proxy_Trait; 20 19 … … 71 70 */ 72 71 protected function get_default() { 73 $defaults = array( 72 return array( 73 'contentPolicyStatus' => (object) array(), 74 74 'ownerID' => 0, 75 75 'publicationID' => '', … … 82 82 'productID' => 'openaccess', 83 83 ); 84 85 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) {86 $defaults['contentPolicyStatus'] = (object) array();87 }88 89 return $defaults;90 84 } 91 85 … … 190 184 } 191 185 192 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) &&isset( $option['contentPolicyStatus'] ) ) {186 if ( isset( $option['contentPolicyStatus'] ) ) { 193 187 // If the `contentPolicyStatus` setting is not an associative array, set it to an empty object. 194 188 if ( ! ( is_array( $option['contentPolicyStatus'] ) && ! BC_Functions::array_is_list( $option['contentPolicyStatus'] ) ) ) { -
google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Synchronize_Publication.php
r3447448 r3479192 13 13 use Google\Site_Kit\Core\Permissions\Permissions; 14 14 use Google\Site_Kit\Core\Storage\User_Options; 15 use Google\Site_Kit\Core\Util\Feature_Flags;16 15 use Google\Site_Kit\Modules\Reader_Revenue_Manager; 17 16 use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Publication; … … 128 127 ); 129 128 130 if ( Feature_Flags::enabled( 'rrmPolicyViolations' ) ) { 131 $content_policy_status = $publication->getContentPolicyStatus(); 132 133 if ( $content_policy_status ) { 134 $new_settings['contentPolicyStatus'] = (array) $content_policy_status->toSimpleObject(); 135 } 129 $content_policy_status = $publication->getContentPolicyStatus(); 130 131 if ( $content_policy_status ) { 132 $new_settings['contentPolicyStatus'] = (array) $content_policy_status->toSimpleObject(); 136 133 } 137 134 -
google-site-kit/trunk/includes/Modules/Search_Console/Email_Reporting/Report_Data_Builder.php
r3447448 r3479192 473 473 } 474 474 475 if ( empty( $labels ) ) {476 return null;477 }478 479 475 return array( 480 476 'section_key' => $section_key, -
google-site-kit/trunk/includes/Modules/Sign_In_With_Google.php
r3389193 r3479192 522 522 * @param array $args Optional arguments to customize button attributes. 523 523 */ 524 do_action( 'googlesitekit_render_sign_in_with_google_button' );524 do_action( 'googlesitekit_render_sign_in_with_google_button', array() ); 525 525 $content .= ob_get_clean(); 526 526 } -
google-site-kit/trunk/includes/Plugin.php
r3457523 r3479192 184 184 $permissions = new Core\Permissions\Permissions( $this->context, $authentication, $modules, $user_options, $dismissed_items ); 185 185 $permissions->register(); 186 187 $golinks = new Core\Golinks\Golinks( $this->context ); 188 $golinks->register(); 189 $golinks->register_handler( 'dashboard', new Core\Golinks\Dashboard_Golink_Handler() ); 186 190 187 191 $nonces = new Core\Nonces\Nonces( $this->context ); … … 241 245 ); 242 246 243 ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $ authentication, $options, $user_options ) )->register();247 ( new Core\Email_Reporting\Email_Reporting( $this->context, $modules, $data_requests, $golinks, $authentication, $options, $user_options ) )->register(); 244 248 } 245 249 … … 318 322 319 323 if ( file_exists( GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php' ) ) { 320 $config = include GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php'; 324 $config = include GOOGLESITEKIT_PLUGIN_DIR_PATH . 'dist/config.php'; // @phpstan-ignore include.fileNotFound 321 325 Feature_Flags::set_features( (array) $config['features'] ); 322 326 } -
google-site-kit/trunk/includes/loader.php
r3118692 r3479192 10 10 11 11 namespace Google\Site_Kit; 12 13 // Define global constants.14 define( 'GOOGLESITEKIT_PLUGIN_BASENAME', plugin_basename( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );15 define( 'GOOGLESITEKIT_PLUGIN_DIR_PATH', plugin_dir_path( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );16 12 17 13 /** -
google-site-kit/trunk/includes/vendor/composer/autoload_classmap.php
r3467940 r3479192 85 85 'Google\\Site_Kit\\Core\\Dismissals\\REST_Dismissals_Controller' => $baseDir . '/Core/Dismissals/REST_Dismissals_Controller.php', 86 86 'Google\\Site_Kit\\Core\\Email\\Email' => $baseDir . '/Core/Email/Email.php', 87 'Google\\Site_Kit\\Core\\Email_Reporting\\ Body_Content_Map' => $baseDir . '/Core/Email_Reporting/Body_Content_Map.php',87 'Google\\Site_Kit\\Core\\Email_Reporting\\Content_Map' => $baseDir . '/Core/Email_Reporting/Content_Map.php', 88 88 'Google\\Site_Kit\\Core\\Email_Reporting\\Eligible_Subscribers_Query' => $baseDir . '/Core/Email_Reporting/Eligible_Subscribers_Query.php', 89 89 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Assets' => $baseDir . '/Core/Email_Reporting/Email_Assets.php', … … 98 98 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting' => $baseDir . '/Core/Email_Reporting/Email_Reporting.php', 99 99 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Data_Requests' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Data_Requests.php', 100 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Golink_Handler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Golink_Handler.php', 100 101 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Pointer' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Pointer.php', 101 102 'Google\\Site_Kit\\Core\\Email_Reporting\\Email_Reporting_Scheduler' => $baseDir . '/Core/Email_Reporting/Email_Reporting_Scheduler.php', … … 115 116 'Google\\Site_Kit\\Core\\Email_Reporting\\Sections_Map' => $baseDir . '/Core/Email_Reporting/Sections_Map.php', 116 117 'Google\\Site_Kit\\Core\\Email_Reporting\\Subscribed_Users_Query' => $baseDir . '/Core/Email_Reporting/Subscribed_Users_Query.php', 118 'Google\\Site_Kit\\Core\\Email_Reporting\\Subscription_Confirmation_Task' => $baseDir . '/Core/Email_Reporting/Subscription_Confirmation_Task.php', 117 119 'Google\\Site_Kit\\Core\\Email_Reporting\\Worker_Task' => $baseDir . '/Core/Email_Reporting/Worker_Task.php', 118 120 'Google\\Site_Kit\\Core\\Expirables\\Expirable_Items' => $baseDir . '/Core/Expirables/Expirable_Items.php', … … 122 124 'Google\\Site_Kit\\Core\\Feature_Tours\\Feature_Tours' => $baseDir . '/Core/Feature_Tours/Feature_Tours.php', 123 125 'Google\\Site_Kit\\Core\\Feature_Tours\\REST_Feature_Tours_Controller' => $baseDir . '/Core/Feature_Tours/REST_Feature_Tours_Controller.php', 126 'Google\\Site_Kit\\Core\\Golinks\\Dashboard_Golink_Handler' => $baseDir . '/Core/Golinks/Dashboard_Golink_Handler.php', 127 'Google\\Site_Kit\\Core\\Golinks\\Golink_Handler_Interface' => $baseDir . '/Core/Golinks/Golink_Handler_Interface.php', 128 'Google\\Site_Kit\\Core\\Golinks\\Golinks' => $baseDir . '/Core/Golinks/Golinks.php', 124 129 'Google\\Site_Kit\\Core\\Guards\\Guard_Interface' => $baseDir . '/Core/Guards/Guard_Interface.php', 125 130 'Google\\Site_Kit\\Core\\HTTP\\Middleware' => $baseDir . '/Core/HTTP/Middleware.php', -
google-site-kit/trunk/readme.txt
r3467940 r3479192 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.17 3.07 Stable tag: 1.174.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.17 3.0 =112 = 1.174.0 = 113 113 114 114 **Enhanced** 115 115 116 * Reset Reader Revenue Manager policy violation notification dismissals when connecting a different publication, or disconnecting the service. See [#12189](https://github.com/google/site-kit-wp/issues/12189). 117 * Update opt-in user tracking for Reader Revenue Manager setup success notification. See [#12104](https://github.com/google/site-kit-wp/issues/12104). 118 * Add GA4 tracking events for RRM policy violation notifications. See [#12103](https://github.com/google/site-kit-wp/issues/12103). 119 * Prevent the Welcome modal from being shown to existing users when the Setup Flow Refresh feature flag is enabled. See [#12068](https://github.com/google/site-kit-wp/issues/12068). 120 * Add "Action needed" badge to RRM module status for policy violations. See [#12017](https://github.com/google/site-kit-wp/issues/12017). 121 * Add Reader Revenue Manager policy violation notifications in Site Kit settings. See [#12014](https://github.com/google/site-kit-wp/issues/12014). 122 * Update email report to include dynamic conversion metrics based on sites' tracked metrics. See [#12001](https://github.com/google/site-kit-wp/issues/12001). 123 * Update the unsubscribe notice of Email Reporting to have a black background. See [#11996](https://github.com/google/site-kit-wp/issues/11996). 124 * Add a confirmation before disabling the Email Reporting settings. See [#11862](https://github.com/google/site-kit-wp/issues/11862). 125 * Add subscription confirmation email template. See [#11853](https://github.com/google/site-kit-wp/issues/11853). 126 * Add email invite template for email reporting. See [#11851](https://github.com/google/site-kit-wp/issues/11851). 127 * Add Email Reporting stats to feature metrics. See [#11850](https://github.com/google/site-kit-wp/issues/11850). 128 * Add the Search Console-only dashboard tour for the new setup flow. See [#11814](https://github.com/google/site-kit-wp/issues/11814). 129 * Add support for base admin URLs that already contain query parameters in the `getAdminURL` selector. Props xipasduarte. See [#11115](https://github.com/google/site-kit-wp/issues/11115). 130 * Add controls for Reader Revenue Manager settings in the WordPress site editor. See [#10312](https://github.com/google/site-kit-wp/issues/10312). 116 * Improve dismissal behavior for RRM policy violation notifications by delaying them for 24 hours after setup and allowing extreme notifications to reappear up to 5 times before permanent dismissal. See [#12247](https://github.com/google/site-kit-wp/issues/12247). 117 * Improve UX of Reader Revenue Manager module setup success notification when setting it up with a publication that has an extreme policy violation. See [#12245](https://github.com/google/site-kit-wp/issues/12245). 118 * Remove the `rrmPolicyViolations` feature flag. Props fresh3nough. See [#12232](https://github.com/google/site-kit-wp/issues/12232). 119 * Add error tracking for Site Kit modules to Email Reporting. See [#12110](https://github.com/google/site-kit-wp/issues/12110). 120 * Remove "New" badges from several modules/settings that are no longer new. See [#12096](https://github.com/google/site-kit-wp/issues/12096). 121 * Ensure the correct GA events are tracked for the dashboard tour. See [#12030](https://github.com/google/site-kit-wp/issues/12030). 122 * Add GA event tracking for user interactions with the "activate Analytics" notification. See [#12028](https://github.com/google/site-kit-wp/issues/12028). 123 * Add GA event tracking for user interaction with the Welcome modal. See [#12027](https://github.com/google/site-kit-wp/issues/12027). 124 * Enhance the reauthentication admin notice to continue an interrupted module setup flow after the user grants the required scopes. See [#11989](https://github.com/google/site-kit-wp/issues/11989). 125 * Adjust desktop layout on email reporting email-report template. See [#11898](https://github.com/google/site-kit-wp/issues/11898). 126 * Ensure query params persist during email subscription flow. See [#11890](https://github.com/google/site-kit-wp/issues/11890). 127 * Include the AdSense menu item in the updated help menu. See [#11877](https://github.com/google/site-kit-wp/issues/11877). 128 * Add component to allow subscription invitations. See [#11857](https://github.com/google/site-kit-wp/issues/11857). 129 * Add error email template. See [#11852](https://github.com/google/site-kit-wp/issues/11852). 130 * Add support for stable deep links to dashboard and email subscription management. See [#11849](https://github.com/google/site-kit-wp/issues/11849). 131 * Implement Email Reporting subscription confirmation email. See [#11842](https://github.com/google/site-kit-wp/issues/11842). 132 * Allow users to start the dashboard feature tour from the "Start a feature tour" item in the help menu. See [#11820](https://github.com/google/site-kit-wp/issues/11820). 133 * Add a notification that prompts users to connect more services after completing Site Kit setup. See [#11818](https://github.com/google/site-kit-wp/issues/11818). 131 134 132 135 **Fixed** 133 136 134 * Fix the issue when users with no permissions received emails from Email Reporting. See [#12152](https://github.com/google/site-kit-wp/issues/12152).135 * Update email headings text to use sentence-case. See [#11966](https://github.com/google/site-kit-wp/issues/11966).136 * Select the "In the field" tab immediately in the PageSpeed Insights widget when field data is available, preventing a flicker due to the "In the Lab" tab being active initially. See [#11173](https://github.com/google/site-kit-wp/issues/11173).137 * Fix bug that caused the Key Metrics banner not to be dismissed. See [#12158](https://github.com/google/site-kit-wp/issues/12158). 138 * Optimize requests for view-only users of Dashboard Sharing when Analytics module is not shared. See [#11994](https://github.com/google/site-kit-wp/issues/11994). 139 * Fix bug that caused text on some notification banners to change/flicker when clicked. See [#11188](https://github.com/google/site-kit-wp/issues/11188). 137 140 138 141 [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.