diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.stories.tsx b/assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.stories.tsx similarity index 68% rename from assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.stories.tsx rename to assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.stories.tsx index a568863b6fd..0203efec0de 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.stories.tsx +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.stories.tsx @@ -1,5 +1,5 @@ /** - * AnalyticsActivationErrorNotification component stories. + * InitialSetupErrorNotification component stories. * * Site Kit by Google, Copyright 2026 Google LLC * @@ -20,16 +20,16 @@ * Internal dependencies */ import { Story } from '@/js/types/Story'; -import AnalyticsActivationErrorNotification from './AnalyticsActivationErrorNotification'; +import InitialSetupErrorNotification from './InitialSetupErrorNotification'; function Template() { - return {} } />; + return {} } />; } export const Default = Template.bind( {} ) as Story; -Default.storyName = 'AnalyticsActivationErrorNotification'; +Default.storyName = 'InitialSetupErrorNotification'; Default.scenario = {}; export default { - title: 'Setup/Using Proxy With Sign-in/Components/AnalyticsActivationErrorNotification', + title: 'Setup/Using Proxy With Sign-in/Components/InitialSetupErrorNotification', }; diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.tsx b/assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.tsx similarity index 71% rename from assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.tsx rename to assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.tsx index efb412ab105..e951e9d5033 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification.tsx +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification.tsx @@ -1,5 +1,5 @@ /** - * SetupUsingProxyWithSignIn AnalyticsActivationErrorNotification component. + * SetupUsingProxyWithSignIn InitialSetupErrorNotification component. * * Site Kit by Google, Copyright 2026 Google LLC * @@ -32,19 +32,19 @@ import { __ } from '@wordpress/i18n'; import Notice from '@/js/components/Notice'; import { NOTICE_TYPES } from '@/js/components/Notice/constants'; -interface AnalyticsActivationErrorNotificationProps { +interface InitialSetupErrorNotificationProps { onRetry?: () => void; } -export const ANALYTICS_ACTIVATION_ERROR_NOTIFICATION = - 'analytics-activation-error-notification'; +export const INITIAL_SETUP_ERROR_NOTIFICATION = + 'initial-setup-error-notification'; -const AnalyticsActivationErrorNotification: FC< - AnalyticsActivationErrorNotificationProps -> = ( { onRetry }: AnalyticsActivationErrorNotificationProps ) => { +const InitialSetupErrorNotification: FC< + InitialSetupErrorNotificationProps +> = ( { onRetry }: InitialSetupErrorNotificationProps ) => { return ( { provideSiteConnection( registry, { hasConnectedAdmins: false, @@ -362,11 +362,9 @@ AnalyticsActivationError.args = { registry .dispatch( CORE_NOTIFICATIONS ) - .registerNotification( ANALYTICS_ACTIVATION_ERROR_NOTIFICATION, { + .registerNotification( INITIAL_SETUP_ERROR_NOTIFICATION, { Component: () => ( - null } - /> + null } /> ), priority: PRIORITY.ERROR_HIGH, areaSlug: NOTIFICATION_AREAS.SPLASH_CONTENT, @@ -377,11 +375,11 @@ AnalyticsActivationError.args = { }, }; -AnalyticsActivationError.parameters = { +InitialSetupError.parameters = { features: [ 'setupFlowRefresh', 'setupFlowRefreshPhase4' ], }; -AnalyticsActivationError.scenario = {}; +InitialSetupError.scenario = {}; export default { title: 'Setup / Using Proxy With Sign-in and setupFlowRefresh enabled', diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.js index b2ff4c4a683..44396a21ea1 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.js +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.js @@ -37,9 +37,9 @@ import { ANALYTICS_NOTICE_CHECKBOX, ANALYTICS_NOTICE_FORM_NAME, } from '@/js/components/setup/constants'; -import AnalyticsActivationErrorNotification, { - ANALYTICS_ACTIVATION_ERROR_NOTIFICATION, -} from '@/js/components/setup/SetupUsingProxyWithSignIn/AnalyticsActivationErrorNotification'; +import InitialSetupErrorNotification, { + INITIAL_SETUP_ERROR_NOTIFICATION, +} from '@/js/components/setup/SetupUsingProxyWithSignIn/InitialSetupErrorNotification'; import { setItem } from '@/js/googlesitekit/api/cache'; import { CORE_LOCATION } from '@/js/googlesitekit/datastore/location/constants'; import { CORE_SITE } from '@/js/googlesitekit/datastore/site/constants'; @@ -181,9 +181,9 @@ export default function SetupUsingProxyWithSignIn() { return; } - registerNotification( ANALYTICS_ACTIVATION_ERROR_NOTIFICATION, { + registerNotification( INITIAL_SETUP_ERROR_NOTIFICATION, { Component: () => ( - ), diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js index 05148338d2a..b8b220c1971 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js @@ -936,7 +936,7 @@ describe( 'SetupUsingProxyWithSignIn', () => { expect( console ).toHaveErrored(); } ); - it( 'should retry plugin setup when the Analytics activation error notification CTA is clicked', async () => { + it( 'should retry plugin setup when the initial setup error notification CTA is clicked', async () => { fetchMock.postOnce( new RegExp( '^/google-site-kit/v1/core/modules/data/activation' diff --git a/bin/check-commit-msg.php b/bin/check-commit-msg.php index 5150a4124d4..2342ee893bc 100644 --- a/bin/check-commit-msg.php +++ b/bin/check-commit-msg.php @@ -26,9 +26,9 @@ function has_color_support() { if ( DIRECTORY_SEPARATOR === '\\' ) { return ( function_exists( 'sapi_windows_vt100_support' ) && sapi_windows_vt100_support( STDERR ) ) // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.sapi_windows_vt100_supportFound - || false !== getenv( 'ANSICON' ) - || 'ON' === getenv( 'ConEmuANSI' ) - || 'xterm' === getenv( 'TERM' ); + || false !== getenv( 'ANSICON' ) + || 'ON' === getenv( 'ConEmuANSI' ) + || 'xterm' === getenv( 'TERM' ); } if ( function_exists( 'stream_isatty' ) ) { diff --git a/includes/Context.php b/includes/Context.php index 8c99f864452..f0d07d6adeb 100644 --- a/includes/Context.php +++ b/includes/Context.php @@ -353,8 +353,8 @@ private function get_amp_mode_from_amp_plugin() { } $exposes_support_mode = defined( 'AMP_Theme_Support::STANDARD_MODE_SLUG' ) - && defined( 'AMP_Theme_Support::TRANSITIONAL_MODE_SLUG' ) - && defined( 'AMP_Theme_Support::READER_MODE_SLUG' ); + && defined( 'AMP_Theme_Support::TRANSITIONAL_MODE_SLUG' ) + && defined( 'AMP_Theme_Support::READER_MODE_SLUG' ); if ( defined( 'AMP__VERSION' ) ) { $amp_plugin_version = AMP__VERSION; @@ -369,12 +369,12 @@ private function get_amp_mode_from_amp_plugin() { if ( $amp_plugin_version_2_or_higher ) { $exposes_support_mode = class_exists( 'AMP_Options_Manager' ) - && method_exists( 'AMP_Options_Manager', 'get_option' ) - && $exposes_support_mode; + && method_exists( 'AMP_Options_Manager', 'get_option' ) + && $exposes_support_mode; } else { $exposes_support_mode = class_exists( 'AMP_Theme_Support' ) - && method_exists( 'AMP_Theme_Support', 'get_support_mode' ) - && $exposes_support_mode; + && method_exists( 'AMP_Theme_Support', 'get_support_mode' ) + && $exposes_support_mode; } if ( $exposes_support_mode ) { @@ -419,7 +419,7 @@ public function is_network_active() { // Consider MU plugins and network-activated plugins as network-active. $this->network_active = strpos( wp_normalize_path( __FILE__ ), wp_normalize_path( WPMU_PLUGIN_DIR ) ) === 0 - || in_array( WP_PLUGIN_DIR . '/' . GOOGLESITEKIT_PLUGIN_BASENAME, $network_active_plugins, true ); + || in_array( WP_PLUGIN_DIR . '/' . GOOGLESITEKIT_PLUGIN_BASENAME, $network_active_plugins, true ); } else { $this->network_active = false; } diff --git a/includes/Core/Admin/Available_Tools.php b/includes/Core/Admin/Available_Tools.php index 76f2fa28577..32a2545c692 100644 --- a/includes/Core/Admin/Available_Tools.php +++ b/includes/Core/Admin/Available_Tools.php @@ -46,19 +46,19 @@ private function render_tool_box() {

- +

- +

diff --git a/includes/Core/Admin/Dashboard.php b/includes/Core/Admin/Dashboard.php index ff8999102c0..e3c5bef6796 100644 --- a/includes/Core/Admin/Dashboard.php +++ b/includes/Core/Admin/Dashboard.php @@ -176,30 +176,30 @@ private function render_googlesitekit_wp_dashboard() { ?>
- render_loading_container( 'googlesitekit-wp-dashboard__cta' ); - ?> + $this->render_loading_container( 'googlesitekit-wp-dashboard__cta' ); + ?>
- render_loading_container( 'googlesitekit-wp-dashboard-loading__can_view_analytics' ); - } - - if ( $display_search_console_data ) { - $this->render_loading_container( 'googlesitekit-wp-dashboard-loading__search_console_active_and_connected' ); - } - - if ( $display_analytics_cta ) { - $this->render_loading_container( 'googlesitekit-wp-dashboard-stats__cta' ); - } - - if ( $display_analytics_data ) { - $this->render_loading_container( 'googlesitekit-unique-visitors-chart-widget' ); - $this->render_loading_container( 'googlesitekit-search-console-widget' ); - } - ?> + render_loading_container( 'googlesitekit-wp-dashboard-loading__can_view_analytics' ); + } + + if ( $display_search_console_data ) { + $this->render_loading_container( 'googlesitekit-wp-dashboard-loading__search_console_active_and_connected' ); + } + + if ( $display_analytics_cta ) { + $this->render_loading_container( 'googlesitekit-wp-dashboard-stats__cta' ); + } + + if ( $display_analytics_data ) { + $this->render_loading_container( 'googlesitekit-unique-visitors-chart-widget' ); + $this->render_loading_container( 'googlesitekit-search-console-widget' ); + } + ?>
diff --git a/includes/Core/Admin/Notice.php b/includes/Core/Admin/Notice.php index afae85ab2df..3650cec23a9 100644 --- a/includes/Core/Admin/Notice.php +++ b/includes/Core/Admin/Notice.php @@ -125,7 +125,7 @@ public function render() { ?>
- +
enqueue_asset( 'googlesitekit-admin-css' ); $cb = is_callable( $this->args['enqueue_callback'] ) - ? $this->args['enqueue_callback'] - : function ( Assets $assets ) { - $assets->enqueue_asset( $this->slug ); - }; + ? $this->args['enqueue_callback'] + : function ( Assets $assets ) { + $assets->enqueue_asset( $this->slug ); + }; call_user_func( $cb, $assets ); } @@ -247,14 +247,14 @@ public function enqueue_assets( Assets $assets ) { */ private function render( Context $context ) { $cb = is_callable( $this->args['render_callback'] ) - ? $this->args['render_callback'] - : function () { - printf( '
', esc_attr( $this->slug ) ); - }; + ? $this->args['render_callback'] + : function () { + printf( '
', esc_attr( $this->slug ) ); + }; echo '
'; - $this->render_noscript_html(); - call_user_func( $cb, $context ); + $this->render_noscript_html(); + call_user_func( $cb, $context ); echo '
'; } } diff --git a/includes/Core/Admin_Bar/Admin_Bar.php b/includes/Core/Admin_Bar/Admin_Bar.php index f9334a615df..7bbe4a59dc1 100644 --- a/includes/Core/Admin_Bar/Admin_Bar.php +++ b/includes/Core/Admin_Bar/Admin_Bar.php @@ -292,29 +292,29 @@ private function menu_markup() { ?>
- render_noscript_html(); ?> + render_noscript_html(); ?>
- +
- +
context->admin_url( 'dashboard' ) - : $this->context->admin_url( 'splash' ); + ? $this->context->admin_url( 'dashboard' ) + : $this->context->admin_url( 'splash' ); } /** diff --git a/includes/Core/Authentication/Google_Proxy.php b/includes/Core/Authentication/Google_Proxy.php index eb3c47bb201..616c03f83b4 100644 --- a/includes/Core/Authentication/Google_Proxy.php +++ b/includes/Core/Authentication/Google_Proxy.php @@ -356,8 +356,8 @@ private function request( $uri, $credentials, array $args = array() ) { */ public function get_site_fields() { $return_uri = Feature_Flags::enabled( 'setupFlowRefresh' ) - ? admin_url( 'index.php' ) - : $this->context->admin_url( 'splash' ); + ? admin_url( 'index.php' ) + : $this->context->admin_url( 'splash' ); $analytics_redirect_uri = add_query_arg( 'gatoscallback', 1, admin_url( 'index.php' ) ); if ( Feature_Flags::enabled( 'setupFlowRefresh' ) ) { diff --git a/includes/Core/Authentication/Setup.php b/includes/Core/Authentication/Setup.php index 5764d29b182..d3cd742d73d 100644 --- a/includes/Core/Authentication/Setup.php +++ b/includes/Core/Authentication/Setup.php @@ -165,8 +165,8 @@ public function handle_action_setup_start() { $this->google_proxy->with_scopes( $required_scopes ); $oauth_setup_redirect = $this->credentials->has() - ? $this->google_proxy->sync_site_fields( $this->credentials, 'sync' ) - : $this->google_proxy->register_site( 'sync' ); + ? $this->google_proxy->sync_site_fields( $this->credentials, 'sync' ) + : $this->google_proxy->register_site( 'sync' ); if ( is_wp_error( $oauth_setup_redirect ) ) { $error_message = $oauth_setup_redirect->get_error_message(); diff --git a/includes/Core/Consent_Mode/REST_Consent_Mode_Controller.php b/includes/Core/Consent_Mode/REST_Consent_Mode_Controller.php index 15f17051cfc..894116d30fa 100644 --- a/includes/Core/Consent_Mode/REST_Consent_Mode_Controller.php +++ b/includes/Core/Consent_Mode/REST_Consent_Mode_Controller.php @@ -61,16 +61,16 @@ class REST_Consent_Mode_Controller { */ protected $options; - /** - * Constructor. - * - * @since 1.122.0 - * @since 1.142.0 Introduces Modules as an argument. - * - * @param Modules $modules Modules instance. - * @param Consent_Mode_Settings $consent_mode_settings Consent_Mode_Settings instance. - * @param Options $options Optional. Option API instance. Default is a new instance. - */ + /** + * Constructor. + * + * @since 1.122.0 + * @since 1.142.0 Introduces Modules as an argument. + * + * @param Modules $modules Modules instance. + * @param Consent_Mode_Settings $consent_mode_settings Consent_Mode_Settings instance. + * @param Options $options Optional. Option API instance. Default is a new instance. + */ public function __construct( Modules $modules, Consent_Mode_Settings $consent_mode_settings, diff --git a/includes/Core/Email_Reporting/Email_Notices.php b/includes/Core/Email_Reporting/Email_Notices.php index adc106394ba..2e5a1088109 100644 --- a/includes/Core/Email_Reporting/Email_Notices.php +++ b/includes/Core/Email_Reporting/Email_Notices.php @@ -351,8 +351,8 @@ private function get_prompt_state( Email_Notice_Interface $notice, $user_id ) { $dismissal_slug = $notice->get_dismissal_slug(); return ( isset( $prompts[ $dismissal_slug ] ) && is_array( $prompts[ $dismissal_slug ] ) ) - ? $prompts[ $dismissal_slug ] - : array(); + ? $prompts[ $dismissal_slug ] + : array(); } /** diff --git a/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php b/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php index 93653605605..5c02c51eb9a 100644 --- a/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php +++ b/includes/Core/Email_Reporting/Email_Reporting_Scheduler.php @@ -177,8 +177,8 @@ private function get_initiator_events_for_frequency( $frequency ) { foreach ( $hooks[ self::ACTION_INITIATOR ] as $event ) { $args = isset( $event['args'] ) && is_array( $event['args'] ) - ? $event['args'] - : array(); + ? $event['args'] + : array(); if ( isset( $args[0] ) && $frequency === $args[0] ) { $events[] = array( diff --git a/includes/Core/Email_Reporting/Email_Template_Formatter.php b/includes/Core/Email_Reporting/Email_Template_Formatter.php index bb9808bf819..f208eb48260 100644 --- a/includes/Core/Email_Reporting/Email_Template_Formatter.php +++ b/includes/Core/Email_Reporting/Email_Template_Formatter.php @@ -193,8 +193,8 @@ private function prepare_sections_payload( $sections, $date_range ) { $first_dimension_value = ''; if ( isset( $dimension_values[0] ) ) { $first_dimension_value = is_array( $dimension_values[0] ) - ? ( $dimension_values[0]['label'] ?? '' ) - : $dimension_values[0]; + ? ( $dimension_values[0]['label'] ?? '' ) + : $dimension_values[0]; } $section_key = $section->get_section_key(); diff --git a/includes/Core/Email_Reporting/Initiator_Task.php b/includes/Core/Email_Reporting/Initiator_Task.php index abe6544530e..b5471718203 100644 --- a/includes/Core/Email_Reporting/Initiator_Task.php +++ b/includes/Core/Email_Reporting/Initiator_Task.php @@ -117,7 +117,7 @@ public static function build_reference_dates( $frequency, $timestamp ) { $time_zone = BC_Functions::wp_timezone(); $date = ( new DateTimeImmutable( '@' . $timestamp ) ) ->setTimezone( $time_zone ) - // Normalise the scheduled timestamp (e.g. 09:00:00) to midnight for date arithmetic. + // Normalise the scheduled timestamp (e.g. 09:00:00) to midnight for date arithmetic. ->setTime( 0, 0, 0 ); switch ( $frequency ) { diff --git a/includes/Core/Email_Reporting/Max_Execution_Limiter.php b/includes/Core/Email_Reporting/Max_Execution_Limiter.php index 3956e45853f..738371838f4 100644 --- a/includes/Core/Email_Reporting/Max_Execution_Limiter.php +++ b/includes/Core/Email_Reporting/Max_Execution_Limiter.php @@ -39,8 +39,8 @@ class Max_Execution_Limiter { */ public function __construct( $max_execution_time ) { $this->max_execution_time = ( $max_execution_time && $max_execution_time > 0 ) - ? (int) $max_execution_time - : self::DEFAULT_LIMIT; + ? (int) $max_execution_time + : self::DEFAULT_LIMIT; } /** diff --git a/includes/Core/Email_Reporting/templates/email-report/parts/notice.php b/includes/Core/Email_Reporting/templates/email-report/parts/notice.php index 5c0176f7815..a958c67f382 100644 --- a/includes/Core/Email_Reporting/templates/email-report/parts/notice.php +++ b/includes/Core/Email_Reporting/templates/email-report/parts/notice.php @@ -51,7 +51,7 @@ - + diff --git a/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php b/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php index 996e73db5d0..67176de2281 100644 --- a/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php +++ b/includes/Core/Email_Reporting/templates/email-report/parts/section-metrics.php @@ -68,22 +68,22 @@ style="vertical-align: top; border-bottom: ; padding: 12px 0;">
- +
- +
- $data['change'], - ) - ); - ?> + $data['change'], + ) + ); + ?>
- +
- + - +
- + - + @@ -97,17 +97,17 @@ - + - $data['changes'][ $index ] ?? 0, - ) - ); - ?> + $data['changes'][ $index ] ?? 0, + ) + ); + ?>
diff --git a/includes/Core/Email_Reporting/templates/parts/footer.php b/includes/Core/Email_Reporting/templates/parts/footer.php index 319886892d3..c78ec7538c8 100644 --- a/includes/Core/Email_Reporting/templates/parts/footer.php +++ b/includes/Core/Email_Reporting/templates/parts/footer.php @@ -18,32 +18,32 @@
- $cta['url'], - 'label' => isset( $cta['label'] ) ? $cta['label'] : __( 'View dashboard', 'google-site-kit' ), - ) - ); - ?> + $cta['url'], + 'label' => isset( $cta['label'] ) ? $cta['label'] : __( 'View dashboard', 'google-site-kit' ), + ) + ); + ?>

- %s', - esc_url( $footer['unsubscribe_url'] ), - esc_html__( 'here', 'google-site-kit' ) - ); + %s', + esc_url( $footer['unsubscribe_url'] ), + esc_html__( 'here', 'google-site-kit' ) + ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Link is escaped above. - printf( '%s %s.', esc_html( $footer['copy'] ), $unsubscribe_link ); - } else { - echo esc_html( $footer['copy'] ); - } - ?> + printf( '%s %s.', esc_html( $footer['copy'] ), $unsubscribe_link ); + } else { + echo esc_html( $footer['copy'] ); + } + ?>

@@ -78,7 +78,7 @@ ?> diff --git a/includes/Core/Email_Reporting/templates/simple-email/parts/content.php b/includes/Core/Email_Reporting/templates/simple-email/parts/content.php index f160eea8d54..d326fc7c5f2 100644 --- a/includes/Core/Email_Reporting/templates/simple-email/parts/content.php +++ b/includes/Core/Email_Reporting/templates/simple-email/parts/content.php @@ -65,11 +65,11 @@ $paragraph ) : ?>

@@ -102,15 +102,15 @@

- +
- $cta['url'], - 'label' => isset( $cta['label'] ) ? $cta['label'] : __( 'Get your report', 'google-site-kit' ), - ) - ); - ?> + $cta['url'], + 'label' => isset( $cta['label'] ) ? $cta['label'] : __( 'Get your report', 'google-site-kit' ), + ) + ); + ?>
diff --git a/includes/Core/Email_Reporting/templates/simple-email/template.php b/includes/Core/Email_Reporting/templates/simple-email/template.php index bcbbac9b535..1c617bd0a4b 100644 --- a/includes/Core/Email_Reporting/templates/simple-email/template.php +++ b/includes/Core/Email_Reporting/templates/simple-email/template.php @@ -98,7 +98,7 @@

- +

diff --git a/includes/Core/Feature_Tours/Dismissed_Tours.php b/includes/Core/Feature_Tours/Dismissed_Tours.php index 8cd56b0455d..fced2b9924b 100644 --- a/includes/Core/Feature_Tours/Dismissed_Tours.php +++ b/includes/Core/Feature_Tours/Dismissed_Tours.php @@ -90,8 +90,8 @@ protected function get_default() { protected function get_sanitize_callback() { return function ( $value ) { return is_array( $value ) - ? array_values( array_unique( $value ) ) - : $this->get(); + ? array_values( array_unique( $value ) ) + : $this->get(); }; } } diff --git a/includes/Core/Nonces/Nonces.php b/includes/Core/Nonces/Nonces.php index b1f9b453c64..142d623b793 100644 --- a/includes/Core/Nonces/Nonces.php +++ b/includes/Core/Nonces/Nonces.php @@ -28,10 +28,10 @@ */ final class Nonces { /* - * Nonce actions. - * - * @since 1.93.0 - */ + * Nonce actions. + * + * @since 1.93.0 + */ const NONCE_UPDATES = 'updates'; /** diff --git a/includes/Core/Permissions/Permissions.php b/includes/Core/Permissions/Permissions.php index ddd6f981c0f..013d0168582 100644 --- a/includes/Core/Permissions/Permissions.php +++ b/includes/Core/Permissions/Permissions.php @@ -34,8 +34,8 @@ */ final class Permissions { /* - * Custom base capabilities. - */ + * Custom base capabilities. + */ const AUTHENTICATE = 'googlesitekit_authenticate'; const SETUP = 'googlesitekit_setup'; const VIEW_POSTS_INSIGHTS = 'googlesitekit_view_posts_insights'; @@ -47,8 +47,8 @@ final class Permissions { /* - * Custom meta capabilities. - */ + * Custom meta capabilities. + */ const VIEW_SPLASH = 'googlesitekit_view_splash'; const VIEW_SHARED_DASHBOARD = 'googlesitekit_view_shared_dashboard'; const VIEW_AUTHENTICATED_DASHBOARD = 'googlesitekit_view_authenticated_dashboard'; diff --git a/includes/Core/Site_Health/Debug_Data.php b/includes/Core/Site_Health/Debug_Data.php index e273514df98..a14c1615ccd 100644 --- a/includes/Core/Site_Health/Debug_Data.php +++ b/includes/Core/Site_Health/Debug_Data.php @@ -672,13 +672,13 @@ private function get_key_metrics_fields() { } $key_metrics_status = isset( $key_metrics_settings['isWidgetHidden'] ) && $key_metrics_settings['isWidgetHidden'] ? - __( 'Setup and Disabled', 'google-site-kit' ) : - __( 'Setup and Enabled', 'google-site-kit' ); + __( 'Setup and Disabled', 'google-site-kit' ) : + __( 'Setup and Enabled', 'google-site-kit' ); // A minimum of 2 key metrics need to be saved to prevent "default" tailored metrics to render. $key_metrics_source = isset( $key_metrics_settings['widgetSlugs'] ) && count( $key_metrics_settings['widgetSlugs'] ) > 1 ? - __( 'Manual Selection', 'google-site-kit' ) : - __( 'Tailored Metrics', 'google-site-kit' ); + __( 'Manual Selection', 'google-site-kit' ) : + __( 'Tailored Metrics', 'google-site-kit' ); return array( 'key_metrics_status' => array( diff --git a/includes/Core/Storage/User_Transients.php b/includes/Core/Storage/User_Transients.php index e66101ac5d5..09a0473fbfd 100644 --- a/includes/Core/Storage/User_Transients.php +++ b/includes/Core/Storage/User_Transients.php @@ -97,8 +97,8 @@ public function switch_user( $user_id ) { */ public function get( $transient ) { return wp_using_ext_object_cache() - ? $this->get_from_cache( $transient ) - : $this->get_from_user_options( $transient ); + ? $this->get_from_cache( $transient ) + : $this->get_from_user_options( $transient ); } /** @@ -113,8 +113,8 @@ public function get( $transient ) { */ public function set( $transient, $value, $expiration = 0 ) { return wp_using_ext_object_cache() - ? $this->set_in_cache( $transient, $value, $expiration ) - : $this->set_in_user_options( $transient, $value, $expiration ); + ? $this->set_in_cache( $transient, $value, $expiration ) + : $this->set_in_user_options( $transient, $value, $expiration ); } /** @@ -127,8 +127,8 @@ public function set( $transient, $value, $expiration = 0 ) { */ public function delete( $transient ) { return wp_using_ext_object_cache() - ? $this->delete_from_cache( $transient ) - : $this->delete_from_user_options( $transient ); + ? $this->delete_from_cache( $transient ) + : $this->delete_from_user_options( $transient ); } /** diff --git a/includes/Core/Tags/GTag.php b/includes/Core/Tags/GTag.php index a6b29fc94a8..6aa37d05fca 100644 --- a/includes/Core/Tags/GTag.php +++ b/includes/Core/Tags/GTag.php @@ -218,8 +218,8 @@ protected function enqueue_gtag_script() { */ protected function get_gtag_call_for_tag( $tag ) { return empty( $tag['config'] ) - ? sprintf( 'gtag("config", "%s");', esc_js( $tag['tag_id'] ) ) - : sprintf( 'gtag("config", "%s", %s);', esc_js( $tag['tag_id'] ), wp_json_encode( $tag['config'] ) ); + ? sprintf( 'gtag("config", "%s");', esc_js( $tag['tag_id'] ) ) + : sprintf( 'gtag("config", "%s", %s);', esc_js( $tag['tag_id'] ), wp_json_encode( $tag['config'] ) ); } /** diff --git a/includes/Core/User/Audience_Settings.php b/includes/Core/User/Audience_Settings.php index 074c1aff58e..3f0ee82ace1 100644 --- a/includes/Core/User/Audience_Settings.php +++ b/includes/Core/User/Audience_Settings.php @@ -112,8 +112,8 @@ protected function get_sanitize_callback() { // Allow setting `null` for `configuredAudiences`. if ( array_key_exists( 'configuredAudiences', $settings ) ) { $sanitized_settings['configuredAudiences'] = is_null( $settings['configuredAudiences'] ) - ? null - : Sanitize::sanitize_string_list( $settings['configuredAudiences'] ); + ? null + : Sanitize::sanitize_string_list( $settings['configuredAudiences'] ); } if ( isset( $settings['isAudienceSegmentationWidgetHidden'] ) ) { diff --git a/includes/Core/User_Surveys/REST_User_Surveys_Controller.php b/includes/Core/User_Surveys/REST_User_Surveys_Controller.php index 3c67a695a91..784ed971b2a 100644 --- a/includes/Core/User_Surveys/REST_User_Surveys_Controller.php +++ b/includes/Core/User_Surveys/REST_User_Surveys_Controller.php @@ -103,7 +103,7 @@ function ( $paths ) { protected function get_rest_routes() { $can_authenticate = function () { return $this->authentication->is_authenticated() - && $this->authentication->credentials()->using_proxy(); + && $this->authentication->credentials()->using_proxy(); }; return array( diff --git a/includes/Core/Util/Requires_Javascript_Trait.php b/includes/Core/Util/Requires_Javascript_Trait.php index 3b34b5a4f47..c53905d5b87 100644 --- a/includes/Core/Util/Requires_Javascript_Trait.php +++ b/includes/Core/Util/Requires_Javascript_Trait.php @@ -32,9 +32,9 @@ protected function render_noscript_html() {

- +

diff --git a/includes/Modules/AdSense/AMP_Tag.php b/includes/Modules/AdSense/AMP_Tag.php index 58dc2582463..0d80986bf75 100644 --- a/includes/Modules/AdSense/AMP_Tag.php +++ b/includes/Modules/AdSense/AMP_Tag.php @@ -84,8 +84,8 @@ private function get_auto_ads_attributes( $type = '' ) { } $filtered_options = 'web-story' === $type - ? apply_filters( 'googlesitekit_amp_story_auto_ads_attributes', $options, $this->tag_id, $this->story_ad_slot_id ) - : apply_filters( 'googlesitekit_amp_auto_ads_attributes', $options, $this->tag_id, $this->story_ad_slot_id ); + ? apply_filters( 'googlesitekit_amp_story_auto_ads_attributes', $options, $this->tag_id, $this->story_ad_slot_id ) + : apply_filters( 'googlesitekit_amp_auto_ads_attributes', $options, $this->tag_id, $this->story_ad_slot_id ); if ( is_array( $filtered_options ) && ! empty( $filtered_options ) ) { $options = $filtered_options; diff --git a/includes/Modules/Ads.php b/includes/Modules/Ads.php index 9a4280fe079..44421a6c87b 100644 --- a/includes/Modules/Ads.php +++ b/includes/Modules/Ads.php @@ -345,8 +345,8 @@ public function register_tag() { } $tag = $this->context->is_amp() - ? new AMP_Tag( $ads_conversion_id, self::MODULE_SLUG ) - : new Web_Tag( $ads_conversion_id, self::MODULE_SLUG ); + ? new AMP_Tag( $ads_conversion_id, self::MODULE_SLUG ) + : new Web_Tag( $ads_conversion_id, self::MODULE_SLUG ); if ( $tag->is_tag_blocked() ) { return; diff --git a/includes/Modules/Analytics_4.php b/includes/Modules/Analytics_4.php index a06eb8bb622..92ec4ac81d9 100644 --- a/includes/Modules/Analytics_4.php +++ b/includes/Modules/Analytics_4.php @@ -1192,8 +1192,8 @@ private function print_tracking_opt_out() { get_measurement_id(); + // Opt-out should always use the measurement ID, even when using a GT tag. + $tag_id = $this->get_measurement_id(); if ( ! empty( $tag_id ) ) { BC_Functions::wp_print_inline_script_tag( sprintf( 'window["ga-disable-%s"] = true;', esc_attr( $tag_id ) ) ); } @@ -1626,8 +1626,8 @@ private function get_provisioning_redirect_uri() { */ public function register_tag() { $tag = $this->context->is_amp() - ? new AMP_Tag( $this->get_measurement_id(), self::MODULE_SLUG ) // AMP currently only works with the measurement ID. - : new Web_Tag( $this->get_tag_id(), self::MODULE_SLUG ); + ? new AMP_Tag( $this->get_measurement_id(), self::MODULE_SLUG ) // AMP currently only works with the measurement ID. + : new Web_Tag( $this->get_tag_id(), self::MODULE_SLUG ); if ( $tag->is_tag_blocked() ) { return; diff --git a/includes/Modules/Analytics_4/Datapoints/Get_Advanced_Data_Breakdowns_Settings.php b/includes/Modules/Analytics_4/Datapoints/Get_Advanced_Data_Breakdowns_Settings.php index c3d1f04f7d7..4367dc97b97 100644 --- a/includes/Modules/Analytics_4/Datapoints/Get_Advanced_Data_Breakdowns_Settings.php +++ b/includes/Modules/Analytics_4/Datapoints/Get_Advanced_Data_Breakdowns_Settings.php @@ -63,8 +63,8 @@ public function create_request( Data_Request $data_request ): callable { $settings = $advanced_data_breakdowns_settings->get(); return current_user_can( Permissions::MANAGE_OPTIONS ) - ? $settings - : array_intersect_key( $settings, array_flip( $advanced_data_breakdowns_settings->get_view_only_keys() ) ); + ? $settings + : array_intersect_key( $settings, array_flip( $advanced_data_breakdowns_settings->get_view_only_keys() ) ); }; } diff --git a/includes/Modules/Analytics_4/Email_Reporting/Report_Data_Processor.php b/includes/Modules/Analytics_4/Email_Reporting/Report_Data_Processor.php index debe122f86d..552cd00ac17 100644 --- a/includes/Modules/Analytics_4/Email_Reporting/Report_Data_Processor.php +++ b/includes/Modules/Analytics_4/Email_Reporting/Report_Data_Processor.php @@ -94,11 +94,11 @@ public function aggregate_dimension_metrics( $dimensions, $rows, $metric_names ) } $dimension_values[ $dimension_value ] = isset( $dimensions[1], $row['dimensions'][ $dimensions[1] ] ) - ? array( - 'label' => $dimension_value, - 'url' => $row['dimensions'][ $dimensions[1] ], - ) - : $dimension_value; + ? array( + 'label' => $dimension_value, + 'url' => $row['dimensions'][ $dimensions[1] ], + ) + : $dimension_value; foreach ( $metric_names as $metric_name ) { if ( ! isset( $row['metrics'][ $metric_name ] ) ) { diff --git a/includes/Modules/Analytics_4/Report/Filters/String_Filter.php b/includes/Modules/Analytics_4/Report/Filters/String_Filter.php index 9c0074b6eb0..37e0e0b819a 100644 --- a/includes/Modules/Analytics_4/Report/Filters/String_Filter.php +++ b/includes/Modules/Analytics_4/Report/Filters/String_Filter.php @@ -36,12 +36,12 @@ class String_Filter implements Filter { */ public function parse_filter_expression( $name, $value ) { $match_type = isset( $value['matchType'] ) - ? $value['matchType'] - : 'EXACT'; + ? $value['matchType'] + : 'EXACT'; $filter_value = isset( $value['value'] ) - ? $value['value'] - : $value; + ? $value['value'] + : $value; // If there are many values for this filter, then it means that we want to find // rows where values are included in the list of provided values. In this case, diff --git a/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php b/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php index 582e731f3ec..590b42386f2 100644 --- a/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php +++ b/includes/Modules/Reader_Revenue_Manager/Admin_Post_List.php @@ -159,18 +159,18 @@ public function bulk_edit_field() {