~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/update.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:49:28 UTC
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: barry.price@canonical.com-20160817044928-viijiwb4tl8jwzmp
new upstream release 4.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
        if ( 'update-selected' == $action ) {
23
23
                if ( ! current_user_can( 'update_plugins' ) )
24
 
                        wp_die( __( 'You do not have sufficient permissions to update plugins for this site.' ) );
 
24
                        wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
25
25
 
26
26
                check_admin_referer( 'bulk-update-plugins' );
27
27
 
47
47
 
48
48
        } elseif ( 'upgrade-plugin' == $action ) {
49
49
                if ( ! current_user_can('update_plugins') )
50
 
                        wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
 
50
                        wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
51
51
 
52
52
                check_admin_referer('upgrade-plugin_' . $plugin);
53
53
 
68
68
 
69
69
        } elseif ('activate-plugin' == $action ) {
70
70
                if ( ! current_user_can('update_plugins') )
71
 
                        wp_die(__('You do not have sufficient permissions to update plugins for this site.'));
 
71
                        wp_die(__('Sorry, you are not allowed to update plugins for this site.'));
72
72
 
73
73
                check_admin_referer('activate-plugin_' . $plugin);
74
74
                if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) {
93
93
        } elseif ( 'install-plugin' == $action ) {
94
94
 
95
95
                if ( ! current_user_can('install_plugins') )
96
 
                        wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
 
96
                        wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
97
97
 
98
98
                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
99
99
 
141
141
        } elseif ( 'upload-plugin' == $action ) {
142
142
 
143
143
                if ( ! current_user_can( 'upload_plugins' ) ) {
144
 
                        wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
 
144
                        wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) );
145
145
                }
146
146
 
147
147
                check_admin_referer('plugin-upload');
169
169
        } elseif ( 'upgrade-theme' == $action ) {
170
170
 
171
171
                if ( ! current_user_can('update_themes') )
172
 
                        wp_die(__('You do not have sufficient permissions to update themes for this site.'));
 
172
                        wp_die(__('Sorry, you are not allowed to update themes for this site.'));
173
173
 
174
174
                check_admin_referer('upgrade-theme_' . $theme);
175
175
 
190
190
                include(ABSPATH . 'wp-admin/admin-footer.php');
191
191
        } elseif ( 'update-selected-themes' == $action ) {
192
192
                if ( ! current_user_can( 'update_themes' ) )
193
 
                        wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
 
193
                        wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
194
194
 
195
195
                check_admin_referer( 'bulk-update-themes' );
196
196
 
216
216
        } elseif ( 'install-theme' == $action ) {
217
217
 
218
218
                if ( ! current_user_can('install_themes') )
219
 
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
 
219
                        wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
220
220
 
221
221
                include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
222
222
 
246
246
        } elseif ( 'upload-theme' == $action ) {
247
247
 
248
248
                if ( ! current_user_can( 'upload_themes' ) ) {
249
 
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
 
249
                        wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) );
250
250
                }
251
251
 
252
252
                check_admin_referer('theme-upload');