diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php
index 19f51a8..9785316 100644
a
|
b
|
function is_admin_bar_showing() { |
1130 | 1130 | global $show_admin_bar, $pagenow; |
1131 | 1131 | |
1132 | 1132 | // For all these types of requests, we never want an admin bar. |
1133 | | if ( defined( 'XMLRPC_REQUEST' ) || defined( 'DOING_AJAX' ) || defined( 'IFRAME_REQUEST' ) ) { |
| 1133 | if ( wp_doing_xmlrpc() || defined( 'IFRAME_REQUEST' ) ) { |
1134 | 1134 | return false; |
1135 | 1135 | } |
1136 | 1136 | |
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index ec5a3d2..7e4b37a 100644
a
|
b
|
function wp_die( $message = '', $title = '', $args = array() ) { |
2784 | 2784 | * @param callable $function Callback function name. |
2785 | 2785 | */ |
2786 | 2786 | $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' ); |
2787 | | } elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { |
| 2787 | } elseif ( wp_doing_xmlrpc() ) { |
2788 | 2788 | /** |
2789 | 2789 | * Filters the callback for killing WordPress execution for XML-RPC requests. |
2790 | 2790 | * |
diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
index a29eed1..4ba8545 100644
a
|
b
|
function wp_doing_cron() { |
1155 | 1155 | } |
1156 | 1156 | |
1157 | 1157 | /** |
| 1158 | * Determines whether the current request is a WordPress XML-RPC request. |
| 1159 | * |
| 1160 | * @since 5.0.0 |
| 1161 | * |
| 1162 | * @return bool True if it's a WordPress XML-RPC request, false otherwise. |
| 1163 | */ |
| 1164 | function wp_doing_xmlrpc() { |
| 1165 | /** |
| 1166 | * Filters whether the current request is a WordPress XML-RPC request. |
| 1167 | * |
| 1168 | * @since 5.0.0 |
| 1169 | * |
| 1170 | * @param bool $wp_doing_cron Whether the current request is a WordPress XML-RPC request. |
| 1171 | */ |
| 1172 | return apply_filters( 'wp_doing_xmlrpc', defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ); |
| 1173 | } |
| 1174 | |
| 1175 | /** |
1158 | 1176 | * Check whether variable is a WordPress Error. |
1159 | 1177 | * |
1160 | 1178 | * Returns true if $thing is an object of the WP_Error class. |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 9a685b9..03302cc 100644
a
|
b
|
function _wp_get_current_user() { |
2646 | 2646 | return $current_user; |
2647 | 2647 | } |
2648 | 2648 | |
2649 | | if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { |
| 2649 | if ( wp_doing_xmlrpc() ) { |
2650 | 2650 | wp_set_current_user( 0 ); |
2651 | 2651 | return $current_user; |
2652 | 2652 | } |