PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php

https://bitbucket.org/sanders_nick/legacy-media
PHP | 65 lines | 48 code | 14 blank | 3 comment | 9 complexity | f3e095c2e86a8ef78eb99bbefcc10f38 MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1, GPL-2.0, BSD-3-Clause, GPL-3.0
  1. <?php
  2. /**
  3. * @package Admin
  4. */
  5. global $wpseo_admin_pages;
  6. $options = get_option( 'wpseo' );
  7. $wpseo_admin_pages->admin_header( 'General', true, 'yoast_wpseo_options', 'wpseo' );
  8. echo $wpseo_admin_pages->hidden( 'ignore_blog_public_warning' );
  9. echo $wpseo_admin_pages->hidden( 'ignore_tour' );
  10. echo $wpseo_admin_pages->hidden( 'ignore_page_comments' );
  11. echo $wpseo_admin_pages->hidden( 'ignore_permalink' );
  12. echo $wpseo_admin_pages->hidden( 'ms_defaults_set' );
  13. echo $wpseo_admin_pages->hidden( 'version' );
  14. if ( isset( $options[ 'blocking_files' ] ) && is_array( $options[ 'blocking_files' ] ) && count( $options[ 'blocking_files' ] ) > 0 ) {
  15. $options[ 'blocking_files' ] = array_unique( $options[ 'blocking_files' ] );
  16. echo '<p id="blocking_files" class="wrong">'
  17. . '<a href="javascript:wpseo_killBlockingFiles(\'' . wp_create_nonce( 'wpseo-blocking-files' ) . '\')" class="button fixit">' . __( 'Fix it.', 'wordpress-seo' ) . '</a>'
  18. . __( 'The following file(s) is/are blocking your XML sitemaps from working properly:', 'wordpress-seo' ) . '<br />';
  19. foreach ( $options[ 'blocking_files' ] as $file ) {
  20. echo esc_html( $file ) . '<br/>';
  21. }
  22. echo __( 'Either delete them (this can be done with the "Fix it" button) or disable WP SEO XML sitemaps.', 'wordpress-seo' );
  23. echo '</p>';
  24. }
  25. if ( strpos( get_option( 'permalink_structure' ), '%postname%' ) === false && !isset( $options[ 'ignore_permalink' ] ) )
  26. echo '<p id="wrong_permalink" class="wrong">'
  27. . '<a href="' . admin_url( 'options-permalink.php' ) . '" class="button fixit">' . __( 'Fix it.', 'wordpress-seo' ) . '</a>'
  28. . '<a href="javascript:wpseo_setIgnore(\'permalink\',\'wrong_permalink\',\'' . wp_create_nonce( 'wpseo-ignore' ) . '\');" class="button fixit">' . __( 'Ignore.', 'wordpress-seo' ) . '</a>'
  29. . __( 'You do not have your postname in the URL of your posts and pages, it is highly recommended that you do. Consider setting your permalink structure to <strong>/%postname%/</strong>.', 'wordpress-seo' ) . '</p>';
  30. if ( get_option( 'page_comments' ) && !isset( $options[ 'ignore_page_comments' ] ) )
  31. echo '<p id="wrong_page_comments" class="wrong">'
  32. . '<a href="javascript:setWPOption(\'page_comments\',\'0\',\'wrong_page_comments\',\'' . wp_create_nonce( 'wpseo-setoption' ) . '\');" class="button fixit">' . __( 'Fix it.', 'wordpress-seo' ) . '</a>'
  33. . '<a href="javascript:wpseo_setIgnore(\'page_comments\',\'wrong_page_comments\',\'' . wp_create_nonce( 'wpseo-ignore' ) . '\');" class="button fixit">' . __( 'Ignore.', 'wordpress-seo' ) . '</a>'
  34. . __( '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' ) . '</p>';
  35. echo '<h2>' . __( 'General', 'wordpress-seo' ) . '</h2>';
  36. if ( isset( $options[ 'ignore_tour' ] ) && $options[ 'ignore_tour' ] ) {
  37. echo '<label class="select">' . __( 'Introduction Tour:', 'wordpress-seo' ) . '</label><a class="button-secondary" href="' . admin_url( 'admin.php?page=wpseo_dashboard&wpseo_restart_tour' ) . '">' . __( 'Start Tour', 'wordpress-seo' ) . '</a>';
  38. echo '<p class="desc label">' . __( 'Take this tour to quickly learn about the use of this plugin.', 'wordpress-seo' ) . '</p>';
  39. }
  40. echo '<label class="select">' . __( 'Default Settings:', 'wordpress-seo' ) . '</label><a class="button-secondary" href="' . admin_url( 'admin.php?page=wpseo_dashboard&wpseo_reset_defaults' ) . '">' . __( 'Reset Default Settings', 'wordpress-seo' ) . '</a>';
  41. echo '<p class="desc label">' . __( 'If you want to restore a site to the default WordPress SEO settings, press this button.', 'wordpress-seo' ) . '</p>';
  42. echo '<h2>' . __( 'Security', 'wordpress-seo' ) . '</h2>';
  43. echo $wpseo_admin_pages->checkbox( 'disableadvanced_meta', __( 'Disable the Advanced part of the WordPress SEO meta box', 'wordpress-seo' ) );
  44. echo '<p class="desc">' . __( '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' ) . '</p>';
  45. echo '<h2>' . __( 'Webmaster Tools', 'wordpress-seo' ) . '</h2>';
  46. echo '<p>' . __( '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' ) . '</p>';
  47. echo $wpseo_admin_pages->textinput( 'googleverify', '<a target="_blank" href="https://www.google.com/webmasters/tools/dashboard?hl=en&amp;siteUrl=' . urlencode( get_bloginfo( 'url' ) ) . '%2F">' . __( 'Google Webmaster Tools', 'wordpress-seo' ) . '</a>' );
  48. echo $wpseo_admin_pages->textinput( 'msverify', '<a target="_blank" href="http://www.bing.com/webmaster/?rfp=1#/Dashboard/?url=' . str_replace( 'http://', '', get_bloginfo( 'url' ) ) . '">' . __( 'Bing Webmaster Tools', 'wordpress-seo' ) . '</a>' );
  49. echo $wpseo_admin_pages->textinput( 'alexaverify', '<a target="_blank" href="http://www.alexa.com/pro/subscription">' . __( 'Alexa Verification ID', 'wordpress-seo' ) . '</a>' );
  50. do_action( 'wpseo_dashboard' );
  51. $wpseo_admin_pages->admin_footer();