~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/network/sites.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:
14
14
        wp_die( __( 'Multisite support is not enabled.' ) );
15
15
 
16
16
if ( ! current_user_can( 'manage_sites' ) )
17
 
        wp_die( __( 'You do not have permission to access this page.' ), 403 );
 
17
        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
18
18
 
19
19
$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
20
20
$pagenum = $wp_list_table->get_pagenum();
91
91
                }
92
92
 
93
93
                if ( $current_site->blog_id == $id ) {
94
 
                        wp_die( __( 'You are not allowed to change the current site.' ) );
 
94
                        wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
95
95
                }
96
96
 
97
97
                $site_details = get_blog_details( $id );
126
126
 
127
127
                case 'deleteblog':
128
128
                        if ( ! current_user_can( 'delete_sites' ) )
129
 
                                wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
 
129
                                wp_die( __( 'Sorry, you are not allowed to access this page.' ), '', array( 'response' => 403 ) );
130
130
 
131
131
                        $updated_action = 'not_deleted';
132
132
                        if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
144
144
                                                switch ( $doaction ) {
145
145
                                                        case 'delete':
146
146
                                                                if ( ! current_user_can( 'delete_site', $val ) )
147
 
                                                                        wp_die( __( 'You are not allowed to delete the site.' ) );
 
147
                                                                        wp_die( __( 'Sorry, you are not allowed to delete the site.' ) );
148
148
 
149
149
                                                                $updated_action = 'all_delete';
150
150
                                                                wpmu_delete_blog( $val, true );
157
157
                                                        break;
158
158
                                                }
159
159
                                        } else {
160
 
                                                wp_die( __( 'You are not allowed to change the current site.' ) );
 
160
                                                wp_die( __( 'Sorry, you are not allowed to change the current site.' ) );
161
161
                                        }
162
162
                                }
163
163
                        } else {
237
237
                        $msg = __( 'Site deleted.' );
238
238
                break;
239
239
                case 'not_deleted':
240
 
                        $msg = __( 'You do not have permission to delete that site.' );
 
240
                        $msg = __( 'Sorry, you are not allowed to delete that site.' );
241
241
                break;
242
242
                case 'archiveblog':
243
243
                        $msg = __( 'Site archived.' );
259
259
                break;
260
260
                default:
261
261
                        /**
262
 
                         * Filter a specific, non-default site-updated message in the Network admin.
 
262
                         * Filters a specific, non-default site-updated message in the Network admin.
263
263
                         *
264
264
                         * The dynamic portion of the hook name, `$_GET['updated']`, refers to the
265
265
                         * non-default site update action.