From 67dbb82d69116b7d875c0104fbfaa76cfec3efc3 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 8 Apr 2010 03:31:51 +0000 Subject: [PATCH] Stop a dismissed admin notice feed from appearing on the next page load. see #12912. git-svn-id: https://develop.svn.wordpress.org/trunk@14038 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ms.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 0b1ae2e78f..5a0cb702c8 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -673,8 +673,10 @@ function admin_notice_feed() { if ( $current_screen->id != 'dashboard' ) return; - if ( !empty( $_GET['feed_dismiss'] ) ) + if ( !empty( $_GET['feed_dismiss'] ) ) { update_user_option( $current_user->id, 'admin_feed_dismiss', $_GET['feed_dismiss'], true ); + return; + } $url = get_site_option( 'admin_notice_feed' ); if ( empty( $url ) ) @@ -690,7 +692,7 @@ function admin_notice_feed() { $content = $content ? wp_html_excerpt( $content, 200 ) . ' … ' : ''; $link = esc_url( strip_tags( $item->get_link() ) ); $msg .= "

" . $content . "" . __( 'Read More' ) . " " . __( 'Dismiss' ) . "

"; - echo "
$msg
"; + echo "
$msg
"; } elseif ( is_super_admin() ) { printf( '
' . __( 'Your feed at %s is empty.' ) . '
', esc_html( $url ) ); }