File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed
Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change 1616 require_once __DIR__ . '/admin.php ' ;
1717}
1818
19- /**
20- * Display a persistent admin notice when “Discourage search engines from indexing this site” is enabled.
21- *
22- * @since 6.9
23- */
24- add_action ( 'admin_notices ' , 'wp_core_search_engine_visibility_notice ' );
25-
26- function wp_core_search_engine_visibility_notice () {
27- if (
28- ! is_network_admin ()
29- && ! is_user_admin ()
30- && current_user_can ( 'manage_options ' )
31- && ! get_option ( 'blog_public ' )
32- ) {
33- ?>
34- <div class="notice notice-error is-dismissible">
35- <p>
36- <?php
37- echo wp_kses_post (
38- sprintf (
39- /* translators: %1$s open link, %2$s close link */
40- __ ( 'Search engines are <strong>discouraged</strong> from indexing your site. %1$sChange this setting%2$s. ' , 'default ' ),
41- '<a href=" ' . esc_url ( admin_url ( 'options-reading.php#blog_public ' ) ) . '"> ' ,
42- '</a> '
43- )
44- );
45- ?>
46- </p>
47- </div>
48- <?php
49- }
50- }
51-
5219/**
5320 * In case admin-header.php is included in a function.
5421 *
You can’t perform that action at this time.
0 commit comments