-
diff --git a/src/wp-activate.php b/src/wp-activate.php
index 728edcf4e3..aac18c3793 100644
a
|
b
|
require __DIR__ . '/wp-blog-header.php'; |
15 | 15 | |
16 | 16 | if ( ! is_multisite() ) { |
17 | 17 | wp_redirect( wp_registration_url() ); |
18 | | die(); |
| 18 | wp_die(); |
19 | 19 | } |
20 | 20 | |
21 | 21 | $valid_error_codes = array( 'already_active', 'blog_taken' ); |
-
diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php
index 17f85a093a..3c7301aaee 100644
a
|
b
|
switch ( $action ) { |
102 | 102 | |
103 | 103 | if ( ! $comment ) { |
104 | 104 | wp_redirect( admin_url( 'edit-comments.php?error=1' ) ); |
105 | | die(); |
| 105 | wp_die(); |
106 | 106 | } |
107 | 107 | |
108 | 108 | if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { |
109 | 109 | wp_redirect( admin_url( 'edit-comments.php?error=2' ) ); |
110 | | die(); |
| 110 | wp_die(); |
111 | 111 | } |
112 | 112 | |
113 | 113 | // No need to re-approve/re-trash/re-spam a comment. |
114 | 114 | if ( str_replace( '1', 'approve', $comment->comment_approved ) === $action ) { |
115 | 115 | wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); |
116 | | die(); |
| 116 | wp_die(); |
117 | 117 | } |
118 | 118 | |
119 | 119 | require_once ABSPATH . 'wp-admin/admin-header.php'; |
… |
… |
switch ( $action ) { |
338 | 338 | } |
339 | 339 | |
340 | 340 | wp_redirect( $redir ); |
341 | | die; |
| 341 | wp_die(); |
342 | 342 | |
343 | 343 | case 'editedcomment': |
344 | 344 | $comment_id = absint( $_POST['comment_ID'] ); |
-
diff --git a/src/wp-admin/export.php b/src/wp-admin/export.php
index 7c59c9e6c0..d50d06cc7b 100644
a
|
b
|
if ( isset( $_GET['download'] ) ) { |
121 | 121 | $args = apply_filters( 'export_args', $args ); |
122 | 122 | |
123 | 123 | export_wp( $args ); |
124 | | die(); |
| 124 | wp_die(); |
125 | 125 | } |
126 | 126 | |
127 | 127 | require_once ABSPATH . 'wp-admin/admin-header.php'; |
-
diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
index 2a91be3f60..a2be390a06 100644
a
|
b
|
class WP_Site_Health { |
238 | 238 | |
239 | 239 | echo ( has_filter( 'wp_version_check', 'wp_version_check' ) ? 'yes' : 'no' ); |
240 | 240 | |
241 | | die(); |
| 241 | wp_die(); |
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
-
diff --git a/src/wp-admin/includes/comment.php b/src/wp-admin/includes/comment.php
index ffec90c81e..84f9af0bec 100644
a
|
b
|
function enqueue_comment_hotkeys_js() { |
215 | 215 | function comment_footer_die( $msg ) { |
216 | 216 | echo "<div class='wrap'><p>$msg</p></div>"; |
217 | 217 | require_once ABSPATH . 'wp-admin/admin-footer.php'; |
218 | | die; |
| 218 | wp_die(); |
219 | 219 | } |
-
diff --git a/src/wp-admin/includes/network.php b/src/wp-admin/includes/network.php
index 027297d598..7a5d1af90c 100644
a
|
b
|
function network_step1( $errors = false ) { |
120 | 120 | ) . '</p></div>'; |
121 | 121 | echo '</div>'; |
122 | 122 | require_once ABSPATH . 'wp-admin/admin-footer.php'; |
123 | | die(); |
| 123 | wp_die(); |
124 | 124 | } |
125 | 125 | |
126 | 126 | $active_plugins = get_option( 'active_plugins' ); |
… |
… |
function network_step1( $errors = false ) { |
133 | 133 | echo '<p>' . __( 'Once the network is created, you may reactivate your plugins.' ) . '</p>'; |
134 | 134 | echo '</div>'; |
135 | 135 | require_once ABSPATH . 'wp-admin/admin-footer.php'; |
136 | | die(); |
| 136 | wp_die(); |
137 | 137 | } |
138 | 138 | |
139 | 139 | $hostname = get_clean_basedomain(); |
… |
… |
function network_step1( $errors = false ) { |
148 | 148 | echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Go to Dashboard' ) . '</a>'; |
149 | 149 | echo '</div>'; |
150 | 150 | require_once ABSPATH . 'wp-admin/admin-footer.php'; |
151 | | die(); |
| 151 | wp_die(); |
152 | 152 | } |
153 | 153 | |
154 | 154 | echo '<form method="post">'; |
-
diff --git a/src/wp-admin/link-parse-opml.php b/src/wp-admin/link-parse-opml.php
index c573db6f60..a202a63669 100644
a
|
b
|
|
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | | die(); |
| 10 | wp_die(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | /** |
-
diff --git a/src/wp-admin/site-health-info.php b/src/wp-admin/site-health-info.php
index 7676a8dc90..546b2f2cfd 100644
a
|
b
|
|
7 | 7 | */ |
8 | 8 | |
9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
10 | | die(); |
| 10 | wp_die(); |
11 | 11 | } |
12 | 12 | |
13 | 13 | if ( ! class_exists( 'WP_Debug_Data' ) ) { |
-
diff --git a/src/wp-admin/update.php b/src/wp-admin/update.php
index 29480c2840..f3953cc07b 100644
a
|
b
|
if ( isset( $_GET['action'] ) ) { |
85 | 85 | wp_redirect( admin_url( 'update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) ); |
86 | 86 | activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true ); |
87 | 87 | wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) ); |
88 | | die(); |
| 88 | wp_die(); |
89 | 89 | } |
90 | 90 | iframe_header( __( 'Plugin Reactivation' ), true ); |
91 | 91 | if ( isset( $_GET['success'] ) ) { |
-
diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php
index 2f1c468b53..7d12e4db8c 100644
a
|
b
|
if ( IS_PROFILE_PAGE && isset( $_GET['newuseremail'] ) && $current_user->ID ) { |
116 | 116 | wp_update_user( $user ); |
117 | 117 | delete_user_meta( $current_user->ID, '_new_email' ); |
118 | 118 | wp_redirect( add_query_arg( array( 'updated' => 'true' ), self_admin_url( 'profile.php' ) ) ); |
119 | | die(); |
| 119 | wp_die(); |
120 | 120 | } else { |
121 | 121 | wp_redirect( add_query_arg( array( 'error' => 'new-email' ), self_admin_url( 'profile.php' ) ) ); |
122 | 122 | } |
… |
… |
if ( IS_PROFILE_PAGE && isset( $_GET['newuseremail'] ) && $current_user->ID ) { |
124 | 124 | check_admin_referer( 'dismiss-' . $current_user->ID . '_new_email' ); |
125 | 125 | delete_user_meta( $current_user->ID, '_new_email' ); |
126 | 126 | wp_redirect( add_query_arg( array( 'updated' => 'true' ), self_admin_url( 'profile.php' ) ) ); |
127 | | die(); |
| 127 | wp_die(); |
128 | 128 | } |
129 | 129 | |
130 | 130 | switch ( $action ) { |
-
diff --git a/src/wp-admin/user-new.php b/src/wp-admin/user-new.php
index 1c62f18cb3..d5ce382e7d 100644
a
|
b
|
if ( isset( $_REQUEST['action'] ) && 'adduser' === $_REQUEST['action'] ) { |
41 | 41 | $user_details = get_user_by( 'login', $user_email ); |
42 | 42 | } else { |
43 | 43 | wp_redirect( add_query_arg( array( 'update' => 'enter_email' ), 'user-new.php' ) ); |
44 | | die(); |
| 44 | wp_die(); |
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
48 | 48 | if ( ! $user_details ) { |
49 | 49 | wp_redirect( add_query_arg( array( 'update' => 'does_not_exist' ), 'user-new.php' ) ); |
50 | | die(); |
| 50 | wp_die(); |
51 | 51 | } |
52 | 52 | |
53 | 53 | if ( ! current_user_can( 'promote_user', $user_details->ID ) ) { |
… |
… |
Please click the following link to confirm the invite: |
179 | 179 | } |
180 | 180 | } |
181 | 181 | wp_redirect( $redirect ); |
182 | | die(); |
| 182 | wp_die(); |
183 | 183 | } elseif ( isset( $_REQUEST['action'] ) && 'createuser' === $_REQUEST['action'] ) { |
184 | 184 | check_admin_referer( 'create-user', '_wpnonce_create-user' ); |
185 | 185 | |
… |
… |
Please click the following link to confirm the invite: |
203 | 203 | $redirect = add_query_arg( 'update', 'add', 'user-new.php' ); |
204 | 204 | } |
205 | 205 | wp_redirect( $redirect ); |
206 | | die(); |
| 206 | wp_die(); |
207 | 207 | } |
208 | 208 | } else { |
209 | 209 | // Adding a new user to this site. |
… |
… |
Please click the following link to confirm the invite: |
246 | 246 | $redirect = add_query_arg( array( 'update' => 'newuserconfirmation' ), 'user-new.php' ); |
247 | 247 | } |
248 | 248 | wp_redirect( $redirect ); |
249 | | die(); |
| 249 | wp_die(); |
250 | 250 | } |
251 | 251 | } |
252 | 252 | } |
-
diff --git a/src/wp-cron.php b/src/wp-cron.php
index f4211d82cd..125724c2a6 100644
a
|
b
|
if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) { |
31 | 31 | } |
32 | 32 | |
33 | 33 | if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) { |
34 | | die(); |
| 34 | wp_die(); |
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
… |
… |
function _get_cron_lock() { |
80 | 80 | |
81 | 81 | $crons = wp_get_ready_cron_jobs(); |
82 | 82 | if ( empty( $crons ) ) { |
83 | | die(); |
| 83 | wp_die(); |
84 | 84 | } |
85 | 85 | |
86 | 86 | $gmt_time = microtime( true ); |
… |
… |
if ( _get_cron_lock() === $doing_wp_cron ) { |
199 | 199 | delete_transient( 'doing_cron' ); |
200 | 200 | } |
201 | 201 | |
202 | | die(); |
| 202 | wp_die(); |
-
diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
index a02ab793ce..a2c17b72c5 100644
a
|
b
|
function redirect_canonical( $requested_url = null, $do_redirect = true ) { |
480 | 480 | $redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] ); |
481 | 481 | |
482 | 482 | wp_redirect( $redirect_url, 301 ); |
483 | | die(); |
| 483 | wp_die(); |
484 | 484 | } |
485 | 485 | } |
486 | 486 | |
… |
… |
function redirect_canonical( $requested_url = null, $do_redirect = true ) { |
539 | 539 | } |
540 | 540 | |
541 | 541 | wp_redirect( $redirect_url, 301 ); |
542 | | die(); |
| 542 | wp_die(); |
543 | 543 | } |
544 | 544 | } |
545 | 545 | |
-
diff --git a/src/wp-includes/class-simplepie.php b/src/wp-includes/class-simplepie.php
index 2bd27359e6..bea833dad4 100644
a
|
b
|
class SimplePie |
712 | 712 | if (version_compare(PHP_VERSION, '5.6', '<')) |
713 | 713 | { |
714 | 714 | trigger_error('Please upgrade to PHP 5.6 or newer.'); |
715 | | die(); |
| 715 | wp_die(); |
716 | 716 | } |
717 | 717 | |
718 | 718 | // Other objects, instances created here so we can set options on them |
-
diff --git a/src/wp-includes/class-wp-ajax-response.php b/src/wp-includes/class-wp-ajax-response.php
index fb90d2ddac..d3aaa2fe33 100644
a
|
b
|
class WP_Ajax_Response { |
159 | 159 | if ( wp_doing_ajax() ) { |
160 | 160 | wp_die(); |
161 | 161 | } else { |
162 | | die(); |
| 162 | wp_die(); |
163 | 163 | } |
164 | 164 | } |
165 | 165 | } |
-
diff --git a/src/wp-includes/class-wp-recovery-mode-link-service.php b/src/wp-includes/class-wp-recovery-mode-link-service.php
index 4fb888c5d6..5cee3cda90 100644
a
|
b
|
class WP_Recovery_Mode_Link_Service { |
93 | 93 | |
94 | 94 | $url = add_query_arg( 'action', self::LOGIN_ACTION_ENTERED, wp_login_url() ); |
95 | 95 | wp_redirect( $url ); |
96 | | die; |
| 96 | wp_die(); |
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
-
diff --git a/src/wp-includes/class-wp-recovery-mode.php b/src/wp-includes/class-wp-recovery-mode.php
index bed00d4ef8..8bd1a3d717 100644
a
|
b
|
class WP_Recovery_Mode { |
232 | 232 | |
233 | 233 | if ( ! $this->is_active() ) { |
234 | 234 | wp_safe_redirect( $redirect_to ); |
235 | | die; |
| 235 | wp_die(); |
236 | 236 | } |
237 | 237 | |
238 | 238 | if ( ! isset( $_GET['action'] ) || self::EXIT_ACTION !== $_GET['action'] ) { |
… |
… |
class WP_Recovery_Mode { |
248 | 248 | } |
249 | 249 | |
250 | 250 | wp_safe_redirect( $redirect_to ); |
251 | | die; |
| 251 | wp_die(); |
252 | 252 | } |
253 | 253 | |
254 | 254 | /** |
-
diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php
index d5ed464e0b..7556e958e9 100644
a
|
b
|
class wpdb { |
2061 | 2061 | // Load custom DB error template, if present. |
2062 | 2062 | if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { |
2063 | 2063 | require_once WP_CONTENT_DIR . '/db-error.php'; |
2064 | | die(); |
| 2064 | wp_die(); |
2065 | 2065 | } |
2066 | 2066 | |
2067 | 2067 | $message = '<h1>' . __( 'Error establishing a database connection' ) . "</h1>\n"; |
-
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index d7ad450680..d11faec532 100644
a
|
b
|
function _default_wp_die_handler( $message, $title = '', $args = array() ) { |
3930 | 3930 | </html> |
3931 | 3931 | <?php |
3932 | 3932 | if ( $parsed_args['exit'] ) { |
3933 | | die(); |
| 3933 | wp_die(); |
3934 | 3934 | } |
3935 | 3935 | } |
3936 | 3936 | |
… |
… |
function _json_wp_die_handler( $message, $title = '', $args = array() ) { |
4010 | 4010 | |
4011 | 4011 | echo wp_json_encode( $data ); |
4012 | 4012 | if ( $parsed_args['exit'] ) { |
4013 | | die(); |
| 4013 | wp_die(); |
4014 | 4014 | } |
4015 | 4015 | } |
4016 | 4016 | |
… |
… |
function _jsonp_wp_die_handler( $message, $title = '', $args = array() ) { |
4052 | 4052 | $jsonp_callback = $_GET['_jsonp']; |
4053 | 4053 | echo '/**/' . $jsonp_callback . '(' . $result . ')'; |
4054 | 4054 | if ( $parsed_args['exit'] ) { |
4055 | | die(); |
| 4055 | wp_die(); |
4056 | 4056 | } |
4057 | 4057 | } |
4058 | 4058 | |
… |
… |
function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) { |
4084 | 4084 | $wp_xmlrpc_server->output( $error->getXml() ); |
4085 | 4085 | } |
4086 | 4086 | if ( $parsed_args['exit'] ) { |
4087 | | die(); |
| 4087 | wp_die(); |
4088 | 4088 | } |
4089 | 4089 | } |
4090 | 4090 | |
… |
… |
EOD; |
4128 | 4128 | |
4129 | 4129 | echo $xml; |
4130 | 4130 | if ( $parsed_args['exit'] ) { |
4131 | | die(); |
| 4131 | wp_die(); |
4132 | 4132 | } |
4133 | 4133 | } |
4134 | 4134 | |
… |
… |
function _scalar_wp_die_handler( $message = '', $title = '', $args = array() ) { |
4152 | 4152 | if ( is_scalar( $message ) ) { |
4153 | 4153 | die( (string) $message ); |
4154 | 4154 | } |
4155 | | die(); |
| 4155 | wp_die(); |
4156 | 4156 | } |
4157 | 4157 | |
4158 | 4158 | if ( is_scalar( $message ) ) { |
… |
… |
function wp_send_json( $response, $status_code = null, $options = 0 ) { |
4436 | 4436 | ) |
4437 | 4437 | ); |
4438 | 4438 | } else { |
4439 | | die; |
| 4439 | wp_die(); |
4440 | 4440 | } |
4441 | 4441 | } |
4442 | 4442 | |
… |
… |
function dead_db() { |
5366 | 5366 | // Load custom DB error template, if present. |
5367 | 5367 | if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) { |
5368 | 5368 | require_once WP_CONTENT_DIR . '/db-error.php'; |
5369 | | die(); |
| 5369 | wp_die(); |
5370 | 5370 | } |
5371 | 5371 | |
5372 | 5372 | // If installing or in the admin, provide the verbose message. |
-
diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
index 02bf0299bf..7b7a00b8c5 100644
a
|
b
|
function wp_maintenance() { |
295 | 295 | |
296 | 296 | if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { |
297 | 297 | require_once WP_CONTENT_DIR . '/maintenance.php'; |
298 | | die(); |
| 298 | wp_die(); |
299 | 299 | } |
300 | 300 | |
301 | 301 | require_once ABSPATH . WPINC . '/functions.php'; |
… |
… |
function wp_not_installed() { |
811 | 811 | $link = wp_guess_url() . '/wp-admin/install.php'; |
812 | 812 | |
813 | 813 | wp_redirect( $link ); |
814 | | die(); |
| 814 | wp_die(); |
815 | 815 | } |
816 | 816 | |
817 | 817 | /** |
… |
… |
function wp_start_scraping_edited_file_errors() { |
1676 | 1676 | ) |
1677 | 1677 | ); |
1678 | 1678 | echo "###### wp_scraping_result_end:$key ######"; |
1679 | | die(); |
| 1679 | wp_die(); |
1680 | 1680 | } |
1681 | 1681 | if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) { |
1682 | 1682 | define( 'WP_SANDBOX_SCRAPING', true ); |
-
diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php
index 9a811edc3a..5425e25fc5 100644
a
|
b
|
if ( ! function_exists( 'check_admin_referer' ) ) : |
1283 | 1283 | |
1284 | 1284 | if ( ! $result && ! ( -1 === $action && str_starts_with( $referer, $adminurl ) ) ) { |
1285 | 1285 | wp_nonce_ays( $action ); |
1286 | | die(); |
| 1286 | wp_die(); |
1287 | 1287 | } |
1288 | 1288 | |
1289 | 1289 | return $result; |
-
diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php
index d9dd834c90..fe0ed92608 100644
a
|
b
|
function rest_api_loaded() { |
410 | 410 | $server->serve_request( $route ); |
411 | 411 | |
412 | 412 | // We're done. |
413 | | die(); |
| 413 | wp_die(); |
414 | 414 | } |
415 | 415 | |
416 | 416 | /** |
-
diff --git a/src/wp-settings.php b/src/wp-settings.php
index 6a7e809872..8f5a05a690 100644
a
|
b
|
if ( is_multisite() ) { |
626 | 626 | $file = ms_site_check(); |
627 | 627 | if ( true !== $file ) { |
628 | 628 | require $file; |
629 | | die(); |
| 629 | wp_die(); |
630 | 630 | } |
631 | 631 | unset( $file ); |
632 | 632 | } |
-
diff --git a/src/wp-signup.php b/src/wp-signup.php
index 9782dad499..44a14b3366 100644
a
|
b
|
nocache_headers(); |
11 | 11 | |
12 | 12 | if ( is_array( get_site_option( 'illegal_names' ) ) && isset( $_GET['new'] ) && in_array( $_GET['new'], get_site_option( 'illegal_names' ), true ) ) { |
13 | 13 | wp_redirect( network_home_url() ); |
14 | | die(); |
| 14 | wp_wp_die(); |
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
… |
… |
add_action( 'wp_head', 'do_signup_header' ); |
31 | 31 | |
32 | 32 | if ( ! is_multisite() ) { |
33 | 33 | wp_redirect( wp_registration_url() ); |
34 | | die(); |
| 34 | wp_die(); |
35 | 35 | } |
36 | 36 | |
37 | 37 | if ( ! is_main_site() ) { |
38 | 38 | wp_redirect( network_site_url( 'wp-signup.php' ) ); |
39 | | die(); |
| 39 | wp_die(); |
40 | 40 | } |
41 | 41 | |
42 | 42 | // Fix for page title. |
… |
… |
function validate_another_blog_signup() { |
432 | 432 | global $blogname, $blog_title, $errors, $domain, $path; |
433 | 433 | $current_user = wp_get_current_user(); |
434 | 434 | if ( ! is_user_logged_in() ) { |
435 | | die(); |
| 435 | wp_die(); |
436 | 436 | } |
437 | 437 | |
438 | 438 | $result = validate_blog_form(); |
-
diff --git a/src/wp-trackback.php b/src/wp-trackback.php
index 7512e33fb4..e937ac95ca 100644
a
|
b
|
function trackback_response( $error = 0, $error_message = '' ) { |
36 | 36 | echo "<error>1</error>\n"; |
37 | 37 | echo "<message>$error_message</message>\n"; |
38 | 38 | echo '</response>'; |
39 | | die(); |
| 39 | wp_die(); |
40 | 40 | } else { |
41 | 41 | echo '<?xml version="1.0" encoding="utf-8"?' . ">\n"; |
42 | 42 | echo "<response>\n"; |
… |
… |
if ( $charset ) { |
66 | 66 | |
67 | 67 | // No valid uses for UTF-7. |
68 | 68 | if ( false !== strpos( $charset, 'UTF-7' ) ) { |
69 | | die; |
| 69 | wp_die(); |
70 | 70 | } |
71 | 71 | |
72 | 72 | // For international trackbacks. |