WordPress.org

Make WordPress Core

Ticket #19824: 19824.patch

File 19824.patch, 1.5 KB (added by linuxologos, 2 years ago)
  • wp-admin/includes/class-wp-upgrader.php

     
    12701270                        'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>', 
    12711271                        'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 
    12721272                ); 
     1273                if ( ! current_user_can( 'activate_plugins' ) ) 
     1274                        unset( $update_actions['plugins_page'] ); 
    12731275 
    12741276                $update_actions = apply_filters('update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info); 
    12751277                if ( ! empty($update_actions) ) 
     
    13021304                        'themes_page' => '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Go to themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>', 
    13031305                        'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 
    13041306                ); 
     1307                if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) 
     1308                        unset( $update_actions['themes_page'] ); 
    13051309 
    13061310                $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info); 
    13071311                if ( ! empty($update_actions) )