Make WordPress Core

Ticket #49329: 49329.2.diff

File 49329.2.diff, 1.7 KB (added by Clorith, 5 years ago)
  • src/wp-admin/includes/class-wp-site-health.php

     
    1818        private $health_check_mysql_required_version = '5.5';
    1919        private $health_check_mysql_rec_version      = '';
    2020
     21        public $php_memory_limit;
     22
    2123        public $schedules;
    2224        public $crons;
    2325        public $last_missed_cron     = null;
     
    3335        public function __construct() {
    3436                $this->maybe_create_scheduled_event();
    3537
     38                // Save memory limit before it's affected by wp_raise_memory_limit( 'admin' ).
     39                $this->php_memory_limit = ini_get( 'memory_limit' );
     40
    3641                $this->timeout_late_cron   = 0;
    3742                $this->timeout_missed_cron = - 5 * MINUTE_IN_SECONDS;
    3843
  • src/wp-admin/includes/class-wp-debug-data.php

     
    648648                                'label' => __( 'PHP memory limit' ),
    649649                                'value' => ini_get( 'memory_limit' ),
    650650                        );
     651
     652                        if ( WP_Site_Health::get_instance()->php_memory_limit !== ini_get( 'memory_limit' ) ) {
     653                                $info['wp-server']['fields']['admin_memory_limit']        = array(
     654                                        'label' => __( 'PHP memory limit (only for admin screens)' ),
     655                                        'value' => WP_Site_Health::get_instance()->php_memory_limit,
     656                                );
     657                        }
     658
    651659                        $info['wp-server']['fields']['max_input_time']      = array(
    652660                                'label' => __( 'Max input time' ),
    653661                                'value' => ini_get( 'max_input_time' ),