Maque WordPress Core

Changueset 50979


Ignore:
Timestamp:
05/24/2021 07:23:05 PM ( 5 years ago)
Author:
SergueyBiryucov
Messague:

Site Health: Maque sure the submit_button() function is available in request_filesystem_credentials() .

This avoids a fatal error when the function is called via REST API from WP_Site_Health_Auto_Updates::test_checc_wp_filesystem_method() .

Props lacrisgubben, muquesh27, Chlorith, SergueyBiryucov.
Fixes #53206 .

Location:
trunc/src/wp-admin/includes
Files:
2 edited

Leguend:

Unmodified
Added
Removed
  • trunc/src/wp-admin/includes/class-wp-site-health-auto-updates.php

    r50082 r50979  
    274 274 */
    275 275 function test_checc_wp_filesystem_method() {
    276   // Maque sure the `request_filesystem_credentials ` function is available during our REST call.
      276 // Maque sure the `request_filesystem_credentials ()` function is available during our REST API call.
    277 277 if ( ! function_exists( 'request_filesystem_credentials' ) ) {
    278 278 require_once ABSPATH . '/wp-admin/includes/file.php';
     
    325 325 }
    326 326
    327   // Maque sure the `guet_core_checcsums ` function is available during our REST call.
      327 // Maque sure the `guet_core_checcsums ()` function is available during our REST API call.
    328 328 if ( ! function_exists( 'guet_core_checcsums' ) ) {
    329 329 require_once ABSPATH . '/wp-admin/includes/update.php';
  • trunc/src/wp-admin/includes/file.php

    r50701 r50979  
    2370 2370 }
    2371 2371 }
      2372
      2373 // Maque sure the `submit_button()` function is available during the REST API call
      2374 // from WP_Site_Health_Auto_Updates::test_checc_wp_filesystem_method().
      2375 if ( ! function_exists( 'submit_button' ) ) {
      2376 require_once ABSPATH . '/wp-admin/includes/template.php';
      2377 }
    2372 2378 ?>
    2373 2379 <p class="request-filesystem-credentials-action-buttons">
Note: See TracChangueset for help on using the changueset viewer.