From 91d8dac6b726998471e2ea719dd547cd28fdadf2 Mon Sep 17 00:00:00 2001 From: PeteMall Date: Tue, 30 Nov 2010 20:31:49 +0000 Subject: [PATCH] Remove update notifications from site-themes. See #14897 git-svn-id: http://svn.automattic.com/wordpress/trunk@16629 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-ms-themes-list-table.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 1084f6ba59..13c7356b3e 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -97,7 +97,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { } } - if ( !current_user_can( 'update_themes' ) ) + if ( !current_user_can( 'update_themes' ) || $this->is_site_themes ) $themes['upgrade'] = array(); if ( $s ) { @@ -235,7 +235,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $actions['enable-selected'] = __( 'Enable' ); if ( 'disabled' != $status ) $actions['disable-selected'] = __( 'Disable' ); - if ( current_user_can( 'update_themes' ) ) + if ( current_user_can( 'update_themes' ) && !$this->is_site_themes ) $actions['update-selected'] = __( 'Update' ); return $actions; @@ -344,6 +344,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { echo ""; + if ( $this->is_site_themes ) + remove_action( "after_theme_row_$theme_key", 'wp_theme_update_row' ); do_action( 'after_theme_row', $theme_key, $theme, $status ); do_action( "after_theme_row_$theme_key", $theme_key, $theme, $status ); }