From 9ebf0afe136a83320b166dd641793b5cc53d0aff Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@14038 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 0b1ae2e78..5a0cb702c 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 ) ); }