WordPress.org

Make WordPress Core

Ticket #14897: 14897.19.diff

File 14897.19.diff, 1.1 KB (added by PeteMall, 9 years ago)

Remove update notifications from site-themes.

  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    9797                        }
    9898                }
    9999
    100                 if ( !current_user_can( 'update_themes' ) )
     100                if ( !current_user_can( 'update_themes' ) || $this->is_site_themes )
    101101                        $themes['upgrade'] = array();
    102102
    103103                if ( $s ) {
     
    235235                        $actions['enable-selected'] = __( 'Enable' );
    236236                if ( 'disabled' != $status )
    237237                        $actions['disable-selected'] = __( 'Disable' );
    238                 if ( current_user_can( 'update_themes' ) )
     238                if ( current_user_can( 'update_themes' ) && !$this->is_site_themes )
    239239                        $actions['update-selected'] = __( 'Update' );
    240240
    241241                return $actions;
     
    344344
    345345                echo "</tr>";
    346346
     347                if ( $this->is_site_themes )
     348                        remove_action( "after_theme_row_$theme_key", 'wp_theme_update_row' );
    347349                do_action( 'after_theme_row', $theme_key, $theme, $status );
    348350                do_action( "after_theme_row_$theme_key", $theme_key, $theme, $status );
    349351        }