admin_header( false, 'wpseo-gsc', false, 'yoast_wpseo_gsc_options' ); $platform_tabs = new WPSEO_GSC_Platform_Tabs(); if ( defined( 'WP_DEBUG' ) && WP_DEBUG && WPSEO_GSC_Settings::get_profile() !== '' ) { ?>
' />
service->get_client()->getAccessToken() ) { $video_url = WPSEO_Shortlinker::get( 'https://yoa.st/screencast-search-console' ); } else { $video_url = WPSEO_Shortlinker::get( 'https://yoa.st/screencast-connect-search-console' ); } $tab = new WPSEO_Option_Tab( 'GSC', __( 'Google Search Console', 'wordpress-seo' ), array( 'video_url' => $video_url ) ); $gsc_help_center = new WPSEO_Help_Center( 'google-search-console', $tab, WPSEO_Utils::is_yoast_seo_premium() ); $gsc_help_center->localize_data(); $gsc_help_center->mount(); switch ( $platform_tabs->current_tab() ) { case 'settings': // Check if there is an access token. if ( null === $this->service->get_client()->getAccessToken() ) { // Print auth screen. echo '

'; printf( /* Translators: %1$s: expands to Yoast SEO, %2$s expands to Google Search Console. */ esc_html__( 'To allow %1$s to fetch your %2$s information, please enter your Google Authorization Code. Clicking the button below will open a new window.', 'wordpress-seo' ), 'Yoast SEO', 'Google Search Console' ); echo "

\n"; echo ''; echo "\n"; echo '

' . esc_html__( 'Enter your Google Authorization Code and press the Authenticate button.', 'wordpress-seo' ) . "

\n"; echo "
\n"; echo ""; echo ""; echo ""; echo "
\n"; } else { $reset_button = '' . esc_html__( 'Reauthenticate with Google ', 'wordpress-seo' ) . ''; echo '

', esc_html__( 'Current profile', 'wordpress-seo' ), '

'; $profile = WPSEO_GSC_Settings::get_profile(); if ( $profile !== '' ) { echo '

'; echo $profile; echo '

'; echo '

'; echo $reset_button; echo '

'; } else { echo "
"; settings_fields( 'yoast_wpseo_gsc_options' ); Yoast_Form::get_instance()->set_option( 'wpseo-gsc' ); echo '

'; $profiles = $this->service->get_sites(); if ( ! empty( $profiles ) ) { $show_save = true; echo Yoast_Form::get_instance()->select( 'profile', __( 'Profile', 'wordpress-seo' ), $profiles ); } else { $show_save = false; esc_html_e( 'There were no profiles found', 'wordpress-seo' ); } echo '

'; echo '

'; if ( $show_save ) { echo ' ' . __( 'or', 'wordpress-seo' ) , ' '; } echo $reset_button; echo '

'; echo '
'; } } break; default: $form_action_url = add_query_arg( 'page', esc_attr( filter_input( INPUT_GET, 'page' ) ) ); get_current_screen()->set_screen_reader_content( array( // There are no views links in this screen, so no need for the views heading. 'heading_views' => null, 'heading_pagination' => __( 'Crawl issues list navigation', 'wordpress-seo' ), 'heading_list' => __( 'Crawl issues list', 'wordpress-seo' ), ) ); // Open
. echo "\n"; // AJAX nonce. echo "\n"; $this->display_table(); // Close . echo "
\n"; break; } ?> '; printf( /* translators: %1$s expands anchor to knowledge base article, %2$s expands to */ esc_html__( 'Please refer to %1$sour article about how to connect your website to Google Search Console%2$s if you need assistance.', 'wordpress-seo' ), '', '' ); echo '

'; ?>
admin_footer( false );