~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/update-core.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
}
21
21
 
22
22
if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )
23
 
        wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
 
23
        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
24
24
 
25
25
/**
26
26
 *
623
623
} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) {
624
624
 
625
625
        if ( ! current_user_can( 'update_core' ) )
626
 
                wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
 
626
                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
627
627
 
628
628
        check_admin_referer('upgrade-core');
629
629
 
647
647
} elseif ( 'do-plugin-upgrade' == $action ) {
648
648
 
649
649
        if ( ! current_user_can( 'update_plugins' ) )
650
 
                wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
 
650
                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
651
651
 
652
652
        check_admin_referer('upgrade-core');
653
653
 
675
675
} elseif ( 'do-theme-upgrade' == $action ) {
676
676
 
677
677
        if ( ! current_user_can( 'update_themes' ) )
678
 
                wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
 
678
                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
679
679
 
680
680
        check_admin_referer('upgrade-core');
681
681
 
705
705
} elseif ( 'do-translation-upgrade' == $action ) {
706
706
 
707
707
        if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_plugins' ) && ! current_user_can( 'update_themes' ) )
708
 
                wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
 
708
                wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
709
709
 
710
710
        check_admin_referer( 'upgrade-translations' );
711
711