Make WordPress Core


Ignore:
Timestamp:
12/05/2013 11:04:46 PM (13 years ago)
Author:
nacin
Message:

Restore "Search Engines Discouraged" to the dashboard.

props JustinSainton.
fixes #26431.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r26697 r26700  
    222222        </ul>
    223223        <p><?php printf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p>
     224        <?php
     225
     226        // Check if search engines are asked not to index this site.
     227        if ( ! is_network_admin() && ! is_user_admin() && current_user_can( 'manage_options' ) && '1' != get_option( 'blog_public' ) ) {
     228
     229                /**
     230                 * Filter the title attribute for the link displayed in Site Content metabox when search engines are discouraged from indexing the site.
     231                 *
     232                 * @since 3.0.0
     233                 *
     234                 * @param string Default attribute text.
     235                 */
     236                $title = apply_filters( 'privacy_on_link_title', __( 'Your site is asking search engines not to index its content' ) );
     237
     238                /**
     239                 * Filter the text for the link displayed in Site Content metabox when search engines are discouraged from indexing the site.
     240                 *
     241                 * @since 3.0.0
     242                 *
     243                 * @param string Default text.
     244                 */
     245                $content = apply_filters( 'privacy_on_link_text' , __( 'Search Engines Discouraged' ) );
     246
     247                echo "<p><a href='options-reading.php' title='$title'>$content</a></p>";
     248        }
     249        ?>
    224250        </div>
    225 
    226251        <?php
    227252        // activity_box_end has a core action, but only prints content when multisite.
Note: See TracChangeset for help on using the changeset viewer.