' . esc_html( $backup_file ) . ', ', 'wordpress-seo' ); $count = 0; $fcontent = str_replace( $options['theme_description_found'], '', $fcontent, $count ); if ( $count > 0 ) { $header_file = fopen( $path . '/header.php', 'w+' ); if ( $header_file ) { if ( fwrite( $header_file, $fcontent ) !== false ) { $msg .= __( 'Removed hardcoded meta description.', 'wordpress-seo' ); $options['theme_has_description'] = false; $options['theme_description_found'] = ''; update_option( 'wpseo', $options ); } else { $msg .= '' . __( 'Failed to remove hardcoded meta description.', 'wordpress-seo' ) . ''; } fclose( $header_file ); } } else { wpseo_description_test(); $msg .= '' . __( 'Earlier found meta description was not found in file. Renewed the description test data.', 'wordpress-seo' ) . ''; } add_settings_error( 'yoast_wpseo_dashboard_options', 'error', $msg, 'updated' ); } } } // Clean up the referrer url for later use if ( isset( $_SERVER['REQUEST_URI'] ) ) { $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'nonce', 'fixmetadesc' ), $_SERVER['REQUEST_URI'] ); } } if ( ( ! isset( $options['theme_has_description'] ) || ( ( isset( $options['theme_has_description'] ) && $options['theme_has_description'] === true ) || $options['theme_description_found'] !== '' ) ) || ( isset( $_GET['checkmetadesc'] ) && check_admin_referer( 'wpseo-check-metadesc', 'nonce' ) ) ) { wpseo_description_test(); // Renew the options after the test $options = get_option( 'wpseo' ); } if ( isset( $_GET['checkmetadesc'] ) ) { // Clean up the referrer url for later use if ( isset( $_SERVER['REQUEST_URI'] ) ) { $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'nonce', 'checkmetadesc' ), $_SERVER['REQUEST_URI'] ); } } $wpseo_admin_pages->admin_header( true, WPSEO_Options::get_group_name( 'wpseo' ), 'wpseo' ); do_action( 'wpseo_all_admin_notices' ); if ( is_array( $options['blocking_files'] ) && count( $options['blocking_files'] ) > 0 ) { echo '

' . '' . __( 'Fix it.', 'wordpress-seo' ) . '' . __( 'The following file(s) is/are blocking your XML sitemaps from working properly:', 'wordpress-seo' ) . '
'; foreach ( $options['blocking_files'] as $file ) { echo esc_html( $file ) . '
'; } echo __( 'Either delete them (this can be done with the "Fix it" button) or disable WP SEO XML sitemaps.', 'wordpress-seo' ); echo '

'; } if ( $options['theme_description_found'] !== '' ) { echo '

' . '' . __( 'Fix it.', 'wordpress-seo' ) . '' . ' ' . __( 'Re-check theme.', 'wordpress-seo' ) . '' . __( 'Your theme contains a meta description, which blocks WordPress SEO from working properly, please delete the following line, or press fix it:', 'wordpress-seo' ) . '
'; echo '' . esc_html( $options['theme_description_found'] ) . ''; echo '

'; } if ( strpos( get_option( 'permalink_structure' ), '%postname%' ) === false && $options['ignore_permalink'] === false ) { echo ''; } if ( get_option( 'page_comments' ) && $options['ignore_page_comments'] === false ) { echo '

' . '' . __( 'Fix it.', 'wordpress-seo' ) . '' . '' . __( 'Ignore.', 'wordpress-seo' ) . '' . __( 'Paging comments is enabled, this is not needed in 999 out of 1000 cases, so the suggestion is to disable it, to do that, simply uncheck the box before "Break comments into pages..."', 'wordpress-seo' ) . '

'; } echo '

' . __( 'General', 'wordpress-seo' ) . '

'; if ( $options['ignore_tour'] === true ) { echo '' . __( 'Start Tour', 'wordpress-seo' ) . ''; echo '

' . __( 'Take this tour to quickly learn about the use of this plugin.', 'wordpress-seo' ) . '

'; } echo '' . __( 'Reset Default Settings', 'wordpress-seo' ) . ''; echo '

' . __( 'If you want to restore a site to the default WordPress SEO settings, press this button.', 'wordpress-seo' ) . '

'; echo '

' . __( 'Tracking', 'wordpress-seo' ) . '

'; echo $wpseo_admin_pages->checkbox( 'yoast_tracking', __( 'Allow tracking of this WordPress install\'s anonymous data.', 'wordpress-seo' ) ); echo '

' . __( "To maintain a plugin as big as WordPress SEO, we need to know what we're dealing with: what kinds of other plugins our users are using, what themes, etc. Please allow us to track that data from your install. It will not track any user details, so your security and privacy are safe with us.", 'wordpress-seo' ) . '

'; echo '

' . __( 'Security', 'wordpress-seo' ) . '

'; echo $wpseo_admin_pages->checkbox( 'disableadvanced_meta', __( 'Disable the Advanced part of the WordPress SEO meta box', 'wordpress-seo' ) ); echo '

' . __( 'Unchecking this box allows authors and editors to redirect posts, noindex them and do other things you might not want if you don\'t trust your authors.', 'wordpress-seo' ) . '

'; echo '

' . __( 'Webmaster Tools', 'wordpress-seo' ) . '

'; echo '

' . __( 'You can use the boxes below to verify with the different Webmaster Tools, if your site is already verified, you can just forget about these. Enter the verify meta values for:', 'wordpress-seo' ) . '

'; echo $wpseo_admin_pages->textinput( 'alexaverify', '' . __( 'Alexa Verification ID', 'wordpress-seo' ) . '' ); echo $wpseo_admin_pages->textinput( 'msverify', '' . __( 'Bing Webmaster Tools', 'wordpress-seo' ) . '' ); echo $wpseo_admin_pages->textinput( 'googleverify', '' . __( 'Google Webmaster Tools', 'wordpress-seo' ) . '' ); echo $wpseo_admin_pages->textinput( 'pinterestverify', '' . __( 'Pinterest', 'wordpress-seo' ) . '' ); echo $wpseo_admin_pages->textinput( 'yandexverify', '' . __( 'Yandex Webmaster Tools', 'wordpress-seo' ) . '' ); do_action( 'wpseo_dashboard' ); $wpseo_admin_pages->admin_footer();