Skip to content

Commit ef07367

Browse files
Admin: Remove the admin notice
1 parent 3964b78 commit ef07367

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/wp-admin/admin-header.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,6 @@
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
*

0 commit comments

Comments
 (0)