/
home
/
altere25
/
sportzsoft.altereddigital.com
/
wp-includes
/
/home/altere25/sportzsoft.altereddigital.com/wp-includes
mkdir
upload
Name
Size
Mode
Actions
assets/
-
0755
rm
block-patterns/
-
0755
rm
block-supports/
-
0755
rm
blocks/
-
0755
rm
certificates/
-
0755
rm
css/
-
0755
rm
customize/
-
0755
rm
fonts/
-
0755
rm
html-api/
-
0755
rm
ID3/
-
0755
rm
images/
-
0755
rm
IXR/
-
0755
rm
js/
-
0755
rm
php-compat/
-
0755
rm
PHPMailer/
-
0755
rm
pomo/
-
0755
rm
Requests/
-
0755
rm
rest-api/
-
0755
rm
SimplePie/
-
0755
rm
sitemaps/
-
0755
rm
sodium_compat/
-
0755
rm
style-engine/
-
0755
rm
Text/
-
0755
rm
theme-compat/
-
0755
rm
widgets/
-
0755
rm
.htaccess
178
0644
edit
dl
rm
admin-bar.php
35996
0644
edit
dl
rm
atomlib.php
11950
0644
edit
dl
rm
author-template.php
18951
0644
edit
dl
rm
block-editor.php
27923
0644
edit
dl
rm
block-i18n.json
316
0644
edit
dl
rm
block-patterns.php
12942
0644
edit
dl
rm
block-template-utils.php
48484
0644
edit
dl
rm
block-template.php
12288
0644
edit
dl
rm
blocks.php
72884
0644
edit
dl
rm
bookmark-template.php
12909
0644
edit
dl
rm
bookmark.php
15378
0644
edit
dl
rm
cache-compat.php
5969
0644
edit
dl
rm
cache.php
13474
0644
edit
dl
rm
canonical.php
34460
0644
edit
dl
rm
capabilities.php
40026
0644
edit
dl
rm
category-template.php
57003
0644
edit
dl
rm
category.php
12709
0644
edit
dl
rm
class-feed.php
529
0644
edit
dl
rm
class-http.php
367
0644
edit
dl
rm
class-IXR.php
2543
0644
edit
dl
rm
class-json.php
43684
0644
edit
dl
rm
class-oembed.php
401
0644
edit
dl
rm
class-phpass.php
6708
0644
edit
dl
rm
class-phpmailer.php
664
0644
edit
dl
rm
class-pop3.php
20969
0644
edit
dl
rm
class-requests.php
2237
0644
edit
dl
rm
class-simplepie.php
98124
0644
edit
dl
rm
class-smtp.php
457
0644
edit
dl
rm
class-snoopy.php
37715
0644
edit
dl
rm
class-walker-category-dropdown.php
2469
0644
edit
dl
rm
class-walker-category.php
8477
0644
edit
dl
rm
class-walker-comment.php
14213
0644
edit
dl
rm
class-walker-nav-menu.php
11313
0644
edit
dl
rm
class-walker-page-dropdown.php
2710
0644
edit
dl
rm
class-walker-page.php
7612
0644
edit
dl
rm
class-wp-admin-bar.php
17364
0644
edit
dl
rm
class-wp-ajax-response.php
5266
0644
edit
dl
rm
class-wp-application-passwords.php
12854
0644
edit
dl
rm
class-wp-block-editor-context.php
1350
0644
edit
dl
rm
class-wp-block-list.php
4773
0644
edit
dl
rm
class-wp-block-parser-block.php
2555
0644
edit
dl
rm
class-wp-block-parser-frame.php
1916
0644
edit
dl
rm
class-wp-block-parser.php
11532
0644
edit
dl
rm
class-wp-block-pattern-categories-registry.php
5371
0644
edit
dl
rm
class-wp-block-patterns-registry.php
10077
0644
edit
dl
rm
class-wp-block-styles-registry.php
5883
0644
edit
dl
rm
class-wp-block-supports.php
5519
0644
edit
dl
rm
class-wp-block-template.php
1951
0644
edit
dl
rm
class-wp-block-type-registry.php
5013
0644
edit
dl
rm
class-wp-block-type.php
14743
0644
edit
dl
rm
class-wp-block.php
8401
0644
edit
dl
rm
class-wp-classic-to-block-menu-converter.php
4088
0644
edit
dl
rm
class-wp-comment-query.php
47829
0644
edit
dl
rm
class-wp-comment.php
9372
0644
edit
dl
rm
class-wp-customize-control.php
25842
0644
edit
dl
rm
class-wp-customize-manager.php
202257
0644
edit
dl
rm
class-wp-customize-nav-menus.php
57566
0644
edit
dl
rm
class-wp-customize-panel.php
10670
0644
edit
dl
rm
class-wp-customize-section.php
11244
0644
edit
dl
rm
class-wp-customize-setting.php
29889
0644
edit
dl
rm
class-wp-customize-widgets.php
71612
0644
edit
dl
rm
class-wp-date-query.php
35719
0644
edit
dl
rm
class-wp-dependencies.php
14062
0644
edit
dl
rm
class-wp-dependency.php
2627
0644
edit
dl
rm
class-wp-duotone.php
39443
0644
edit
dl
rm
class-wp-editor.php
72084
0644
edit
dl
rm
class-wp-embed.php
15994
0644
edit
dl
rm
class-wp-error.php
7502
0644
edit
dl
rm
class-wp-fatal-error-handler.php
7872
0644
edit
dl
rm
class-wp-feed-cache-transient.php
2586
0644
edit
dl
rm
class-wp-feed-cache.php
969
0644
edit
dl
rm
class-wp-hook.php
16000
0644
edit
dl
rm
class-wp-http-cookie.php
7389
0644
edit
dl
rm
class-wp-http-curl.php
12541
0644
edit
dl
rm
class-wp-http-encoding.php
6689
0644
edit
dl
rm
class-wp-http-ixr-client.php
3506
0644
edit
dl
rm
class-wp-http-proxy.php
5980
0644
edit
dl
rm
class-wp-http-requests-hooks.php
2022
0644
edit
dl
rm
class-wp-http-requests-response.php
4400
0644
edit
dl
rm
class-wp-http-response.php
2977
0644
edit
dl
rm
class-wp-http-streams.php
16859
0644
edit
dl
rm
class-wp-http.php
40585
0644
edit
dl
rm
class-wp-image-editor-gd.php
17525
0644
edit
dl
rm
class-wp-image-editor-imagick.php
37639
0644
edit
dl
rm
class-wp-image-editor.php
17584
0644
edit
dl
rm
class-wp-list-util.php
7443
0644
edit
dl
rm
class-wp-locale-switcher.php
6561
0644
edit
dl
rm
class-wp-locale.php
16115
0644
edit
dl
rm
class-wp-matchesmapregex.php
1826
0644
edit
dl
rm
class-wp-meta-query.php
30533
0644
edit
dl
rm
class-wp-metadata-lazyloader.php
6833
0644
edit
dl
rm
class-wp-navigation-fallback.php
9211
0644
edit
dl
rm
class-wp-network-query.php
19291
0644
edit
dl
rm
class-wp-network.php
12189
0644
edit
dl
rm
class-wp-object-cache.php
17605
0644
edit
dl
rm
class-wp-oembed-controller.php
6879
0644
edit
dl
rm
class-wp-oembed.php
31394
0644
edit
dl
rm
class-wp-paused-extensions-storage.php
5062
0644
edit
dl
rm
class-wp-post-type.php
29978
0644
edit
dl
rm
class-wp-post.php
6484
0644
edit
dl
rm
class-wp-query.php
151582
0644
edit
dl
rm
class-wp-recovery-mode-cookie-service.php
6877
0644
edit
dl
rm
class-wp-recovery-mode-email-service.php
11183
0644
edit
dl
rm
class-wp-recovery-mode-key-service.php
4501
0644
edit
dl
rm
class-wp-recovery-mode-link-service.php
3463
0644
edit
dl
rm
class-wp-recovery-mode.php
11435
0644
edit
dl
rm
class-wp-rewrite.php
63430
0644
edit
dl
rm
class-wp-role.php
2523
0644
edit
dl
rm
class-wp-roles.php
8580
0644
edit
dl
rm
class-wp-scripts.php
28663
0644
edit
dl
rm
class-wp-session-tokens.php
7451
0644
edit
dl
rm
class-wp-simplepie-file.php
3377
0644
edit
dl
rm
class-wp-simplepie-sanitize-kses.php
1770
0644
edit
dl
rm
class-wp-site-query.php
31020
0644
edit
dl
rm
class-wp-site.php
7454
0644
edit
dl
rm
class-wp-styles.php
10898
0644
edit
dl
rm
class-wp-tax-query.php
19545
0644
edit
dl
rm
class-wp-taxonomy.php
18567
0644
edit
dl
rm
class-wp-term-query.php
41015
0644
edit
dl
rm
class-wp-term.php
5298
0644
edit
dl
rm
class-wp-text-diff-renderer-inline.php
829
0644
edit
dl
rm
class-wp-text-diff-renderer-table.php
18807
0644
edit
dl
rm
class-wp-textdomain-registry.php
5976
0644
edit
dl
rm
class-wp-theme-json-data.php
1553
0644
edit
dl
rm
class-wp-theme-json-resolver.php
24641
0644
edit
dl
rm
class-wp-theme-json-schema.php
4223
0644
edit
dl
rm
class-wp-theme-json.php
129558
0644
edit
dl
rm
class-wp-theme.php
64267
0644
edit
dl
rm
class-wp-user-meta-session-tokens.php
2990
0644
edit
dl
rm
class-wp-user-query.php
43391
0644
edit
dl
rm
class-wp-user-request.php
2222
0644
edit
dl
rm
class-wp-user.php
22762
0644
edit
dl
rm
class-wp-walker.php
13166
0644
edit
dl
rm
class-wp-widget-factory.php
3347
0644
edit
dl
rm
class-wp-widget.php
18386
0644
edit
dl
rm
class-wp-xmlrpc-server.php
214140
0644
edit
dl
rm
class-wp.php
26119
0644
edit
dl
rm
class-wpdb.php
119457
0644
edit
dl
rm
class.wp-dependencies.php
373
0644
edit
dl
rm
class.wp-scripts.php
343
0644
edit
dl
rm
class.wp-styles.php
338
0644
edit
dl
rm
comment-template.php
101432
0644
edit
dl
rm
comment.php
129112
0644
edit
dl
rm
compat.php
15219
0644
edit
dl
rm
cron.php
41473
0644
edit
dl
rm
date.php
400
0644
edit
dl
rm
default-constants.php
11171
0644
edit
dl
rm
default-filters.php
34506
0644
edit
dl
rm
default-widgets.php
2222
0644
edit
dl
rm
deprecated.php
183809
0644
edit
dl
rm
embed-template.php
338
0644
edit
dl
rm
embed.php
37659
0644
edit
dl
rm
error-protection.php
4121
0644
edit
dl
rm
feed-atom-comments.php
5451
0644
edit
dl
rm
feed-atom.php
3048
0644
edit
dl
rm
feed-rdf.php
2668
0644
edit
dl
rm
feed-rss.php
1189
0644
edit
dl
rm
feed-rss2-comments.php
4080
0644
edit
dl
rm
feed-rss2.php
3799
0644
edit
dl
rm
feed.php
23057
0644
edit
dl
rm
fonts.php
2338
0644
edit
dl
rm
formatting.php
334991
0644
edit
dl
rm
functions.php
276285
0644
edit
dl
rm
functions.wp-scripts.php
14759
0644
edit
dl
rm
functions.wp-styles.php
8583
0644
edit
dl
rm
general-template.php
167724
0644
edit
dl
rm
global-styles-and-settings.php
20205
0644
edit
dl
rm
http.php
25624
0644
edit
dl
rm
https-detection.php
5661
0644
edit
dl
rm
https-migration.php
4741
0644
edit
dl
rm
kses.php
72065
0644
edit
dl
rm
l10n.php
62783
0644
edit
dl
rm
link-template.php
156075
0644
edit
dl
rm
load.php
54129
0644
edit
dl
rm
locale.php
162
0644
edit
dl
rm
media-template.php
61821
0644
edit
dl
rm
media.php
207426
0644
edit
dl
rm
meta.php
64078
0644
edit
dl
rm
ms-blogs.php
25628
0644
edit
dl
rm
ms-default-constants.php
4900
0644
edit
dl
rm
ms-default-filters.php
6636
0644
edit
dl
rm
ms-deprecated.php
21758
0644
edit
dl
rm
ms-files.php
2711
0644
edit
dl
rm
ms-functions.php
91258
0644
edit
dl
rm
ms-load.php
19870
0644
edit
dl
rm
ms-network.php
3782
0644
edit
dl
rm
ms-settings.php
4124
0644
edit
dl
rm
ms-site.php
40502
0644
edit
dl
rm
nav-menu-template.php
25785
0644
edit
dl
rm
nav-menu.php
44052
0644
edit
dl
rm
option.php
91340
0644
edit
dl
rm
pluggable-deprecated.php
6263
0644
edit
dl
rm
pluggable.php
113021
0644
edit
dl
rm
plugin.php
35465
0644
edit
dl
rm
post-formats.php
7100
0644
edit
dl
rm
post-template.php
66793
0644
edit
dl
rm
post-thumbnail-template.php
10308
0644
edit
dl
rm
post.php
278320
0644
edit
dl
rm
query.php
37035
0644
edit
dl
rm
registration-functions.php
200
0644
edit
dl
rm
registration.php
200
0644
edit
dl
rm
rest-api.php
97144
0644
edit
dl
rm
revision.php
30905
0644
edit
dl
rm
rewrite.php
19514
0644
edit
dl
rm
robots-template.php
5185
0644
edit
dl
rm
rss-functions.php
255
0644
edit
dl
rm
rss.php
23015
0644
edit
dl
rm
script-loader.php
130079
0644
edit
dl
rm
session.php
258
0644
edit
dl
rm
shortcodes.php
23856
0644
edit
dl
rm
sitemaps.php
3238
0644
edit
dl
rm
spl-autoload-compat.php
441
0644
edit
dl
rm
style-engine.php
7200
0644
edit
dl
rm
taxonomy.php
173528
0644
edit
dl
rm
template-canvas.php
544
0644
edit
dl
rm
template-loader.php
3350
0644
edit
dl
rm
template.php
23525
0644
edit
dl
rm
theme-i18n.json
1151
0644
edit
dl
rm
theme-previews.php
2826
0644
edit
dl
rm
theme-templates.php
6223
0644
edit
dl
rm
theme.json
7303
0644
edit
dl
rm
theme.php
131209
0644
edit
dl
rm
update.php
36824
0644
edit
dl
rm
user.php
171798
0644
edit
dl
rm
vars.php
6202
0644
edit
dl
rm
version.php
929
0644
edit
dl
rm
widgets.php
69875
0644
edit
dl
rm
wp-db.php
445
0644
edit
dl
rm
wp-diff.php
647
0644
edit
dl
rm
Edit:
/home/altere25/sportzsoft.altereddigital.com/wp-includes/class-wp-recovery-mode.php
(11435B)
<?php /** * Error Protection API: WP_Recovery_Mode class * * @package WordPress * @since 5.2.0 */ /** * Core class used to implement Recovery Mode. * * @since 5.2.0 */ #[AllowDynamicProperties] class WP_Recovery_Mode { const EXIT_ACTION = 'exit_recovery_mode'; /** * Service to handle cookies. * * @since 5.2.0 * @var WP_Recovery_Mode_Cookie_Service */ private $cookie_service; /** * Service to generate a recovery mode key. * * @since 5.2.0 * @var WP_Recovery_Mode_Key_Service */ private $key_service; /** * Service to generate and validate recovery mode links. * * @since 5.2.0 * @var WP_Recovery_Mode_Link_Service */ private $link_service; /** * Service to handle sending an email with a recovery mode link. * * @since 5.2.0 * @var WP_Recovery_Mode_Email_Service */ private $email_service; /** * Is recovery mode initialized. * * @since 5.2.0 * @var bool */ private $is_initialized = false; /** * Is recovery mode active in this session. * * @since 5.2.0 * @var bool */ private $is_active = false; /** * Get an ID representing the current recovery mode session. * * @since 5.2.0 * @var string */ private $session_id = ''; /** * WP_Recovery_Mode constructor. * * @since 5.2.0 */ public function __construct() { $this->cookie_service = new WP_Recovery_Mode_Cookie_Service(); $this->key_service = new WP_Recovery_Mode_Key_Service(); $this->link_service = new WP_Recovery_Mode_Link_Service( $this->cookie_service, $this->key_service ); $this->email_service = new WP_Recovery_Mode_Email_Service( $this->link_service ); } /** * Initialize recovery mode for the current request. * * @since 5.2.0 */ public function initialize() { $this->is_initialized = true; add_action( 'wp_logout', array( $this, 'exit_recovery_mode' ) ); add_action( 'login_form_' . self::EXIT_ACTION, array( $this, 'handle_exit_recovery_mode' ) ); add_action( 'recovery_mode_clean_expired_keys', array( $this, 'clean_expired_keys' ) ); if ( ! wp_next_scheduled( 'recovery_mode_clean_expired_keys' ) && ! wp_installing() ) { wp_schedule_event( time(), 'daily', 'recovery_mode_clean_expired_keys' ); } if ( defined( 'WP_RECOVERY_MODE_SESSION_ID' ) ) { $this->is_active = true; $this->session_id = WP_RECOVERY_MODE_SESSION_ID; return; } if ( $this->cookie_service->is_cookie_set() ) { $this->handle_cookie(); return; } $this->link_service->handle_begin_link( $this->get_link_ttl() ); } /** * Checks whether recovery mode is active. * * This will not change after recovery mode has been initialized. {@see WP_Recovery_Mode::run()}. * * @since 5.2.0 * * @return bool True if recovery mode is active, false otherwise. */ public function is_active() { return $this->is_active; } /** * Gets the recovery mode session ID. * * @since 5.2.0 * * @return string The session ID if recovery mode is active, empty string otherwise. */ public function get_session_id() { return $this->session_id; } /** * Checks whether recovery mode has been initialized. * * Recovery mode should not be used until this point. Initialization happens immediately before loading plugins. * * @since 5.2.0 * * @return bool */ public function is_initialized() { return $this->is_initialized; } /** * Handles a fatal error occurring. * * The calling API should immediately die() after calling this function. * * @since 5.2.0 * * @param array $error Error details from `error_get_last()`. * @return true|WP_Error True if the error was handled and headers have already been sent. * Or the request will exit to try and catch multiple errors at once. * WP_Error if an error occurred preventing it from being handled. */ public function handle_error( array $error ) { $extension = $this->get_extension_for_error( $error ); if ( ! $extension || $this->is_network_plugin( $extension ) ) { return new WP_Error( 'invalid_source', __( 'Error not caused by a plugin or theme.' ) ); } if ( ! $this->is_active() ) { if ( ! is_protected_endpoint() ) { return new WP_Error( 'non_protected_endpoint', __( 'Error occurred on a non-protected endpoint.' ) ); } if ( ! function_exists( 'wp_generate_password' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } return $this->email_service->maybe_send_recovery_mode_email( $this->get_email_rate_limit(), $error, $extension ); } if ( ! $this->store_error( $error ) ) { return new WP_Error( 'storage_error', __( 'Failed to store the error.' ) ); } if ( headers_sent() ) { return true; } $this->redirect_protected(); } /** * Ends the current recovery mode session. * * @since 5.2.0 * * @return bool True on success, false on failure. */ public function exit_recovery_mode() { if ( ! $this->is_active() ) { return false; } $this->email_service->clear_rate_limit(); $this->cookie_service->clear_cookie(); wp_paused_plugins()->delete_all(); wp_paused_themes()->delete_all(); return true; } /** * Handles a request to exit Recovery Mode. * * @since 5.2.0 */ public function handle_exit_recovery_mode() { $redirect_to = wp_get_referer(); // Safety check in case referrer returns false. if ( ! $redirect_to ) { $redirect_to = is_user_logged_in() ? admin_url() : home_url(); } if ( ! $this->is_active() ) { wp_safe_redirect( $redirect_to ); die; } if ( ! isset( $_GET['action'] ) || self::EXIT_ACTION !== $_GET['action'] ) { return; } if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], self::EXIT_ACTION ) ) { wp_die( __( 'Exit recovery mode link expired.' ), 403 ); } if ( ! $this->exit_recovery_mode() ) { wp_die( __( 'Failed to exit recovery mode. Please try again later.' ) ); } wp_safe_redirect( $redirect_to ); die; } /** * Cleans any recovery mode keys that have expired according to the link TTL. * * Executes on a daily cron schedule. * * @since 5.2.0 */ public function clean_expired_keys() { $this->key_service->clean_expired_keys( $this->get_link_ttl() ); } /** * Handles checking for the recovery mode cookie and validating it. * * @since 5.2.0 */ protected function handle_cookie() { $validated = $this->cookie_service->validate_cookie(); if ( is_wp_error( $validated ) ) { $this->cookie_service->clear_cookie(); $validated->add_data( array( 'status' => 403 ) ); wp_die( $validated ); } $session_id = $this->cookie_service->get_session_id_from_cookie(); if ( is_wp_error( $session_id ) ) { $this->cookie_service->clear_cookie(); $session_id->add_data( array( 'status' => 403 ) ); wp_die( $session_id ); } $this->is_active = true; $this->session_id = $session_id; } /** * Gets the rate limit between sending new recovery mode email links. * * @since 5.2.0 * * @return int Rate limit in seconds. */ protected function get_email_rate_limit() { /** * Filters the rate limit between sending new recovery mode email links. * * @since 5.2.0 * * @param int $rate_limit Time to wait in seconds. Defaults to 1 day. */ return apply_filters( 'recovery_mode_email_rate_limit', DAY_IN_SECONDS ); } /** * Gets the number of seconds the recovery mode link is valid for. * * @since 5.2.0 * * @return int Interval in seconds. */ protected function get_link_ttl() { $rate_limit = $this->get_email_rate_limit(); $valid_for = $rate_limit; /** * Filters the amount of time the recovery mode email link is valid for. * * The ttl must be at least as long as the email rate limit. * * @since 5.2.0 * * @param int $valid_for The number of seconds the link is valid for. */ $valid_for = apply_filters( 'recovery_mode_email_link_ttl', $valid_for ); return max( $valid_for, $rate_limit ); } /** * Gets the extension that the error occurred in. * * @since 5.2.0 * * @global array $wp_theme_directories * * @param array $error Error details from `error_get_last()`. * @return array|false { * Extension details. * * @type string $slug The extension slug. This is the plugin or theme's directory. * @type string $type The extension type. Either 'plugin' or 'theme'. * } */ protected function get_extension_for_error( $error ) { global $wp_theme_directories; if ( ! isset( $error['file'] ) ) { return false; } if ( ! defined( 'WP_PLUGIN_DIR' ) ) { return false; } $error_file = wp_normalize_path( $error['file'] ); $wp_plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); if ( str_starts_with( $error_file, $wp_plugin_dir ) ) { $path = str_replace( $wp_plugin_dir . '/', '', $error_file ); $parts = explode( '/', $path ); return array( 'type' => 'plugin', 'slug' => $parts[0], ); } if ( empty( $wp_theme_directories ) ) { return false; } foreach ( $wp_theme_directories as $theme_directory ) { $theme_directory = wp_normalize_path( $theme_directory ); if ( str_starts_with( $error_file, $theme_directory ) ) { $path = str_replace( $theme_directory . '/', '', $error_file ); $parts = explode( '/', $path ); return array( 'type' => 'theme', 'slug' => $parts[0], ); } } return false; } /** * Checks whether the given extension a network activated plugin. * * @since 5.2.0 * * @param array $extension Extension data. * @return bool True if network plugin, false otherwise. */ protected function is_network_plugin( $extension ) { if ( 'plugin' !== $extension['type'] ) { return false; } if ( ! is_multisite() ) { return false; } $network_plugins = wp_get_active_network_plugins(); foreach ( $network_plugins as $plugin ) { if ( str_starts_with( $plugin, $extension['slug'] . '/' ) ) { return true; } } return false; } /** * Stores the given error so that the extension causing it is paused. * * @since 5.2.0 * * @param array $error Error details from `error_get_last()`. * @return bool True if the error was stored successfully, false otherwise. */ protected function store_error( $error ) { $extension = $this->get_extension_for_error( $error ); if ( ! $extension ) { return false; } switch ( $extension['type'] ) { case 'plugin': return wp_paused_plugins()->set( $extension['slug'], $error ); case 'theme': return wp_paused_themes()->set( $extension['slug'], $error ); default: return false; } } /** * Redirects the current request to allow recovering multiple errors in one go. * * The redirection will only happen when on a protected endpoint. * * It must be ensured that this method is only called when an error actually occurred and will not occur on the * next request again. Otherwise it will create a redirect loop. * * @since 5.2.0 */ protected function redirect_protected() { // Pluggable is usually loaded after plugins, so we manually include it here for redirection functionality. if ( ! function_exists( 'wp_safe_redirect' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } $scheme = is_ssl() ? 'https://' : 'http://'; $url = "{$scheme}{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; wp_safe_redirect( $url ); exit; } }
Save
cmd:
run