Changeset 46797 for trunk/src/wp-admin/includes/class-wp-site-health.php
- Timestamp:
- 11/28/2019 03:46:45 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-site-health.php
r46586 r46797 1017 1017 1018 1018 /** 1019 * Test if the PHP default timezone is set to UTC. 1020 * 1021 * @since 5.3.1 1022 * 1023 * @return array The test results. 1024 */ 1025 public function get_test_php_default_timezone() { 1026 $result = array( 1027 'label' => __( 'PHP default timezone is valid' ), 1028 'status' => 'good', 1029 'badge' => array( 1030 'label' => __( 'Performance' ), 1031 'color' => 'blue', 1032 ), 1033 'description' => sprintf( 1034 '<p>%s</p>', 1035 __( 'PHP default timezone was configured by WordPress on loading. This is necessary for correct calculations of dates and times.' ) 1036 ), 1037 'test' => 'php_default_timezone', 1038 ); 1039 1040 if ( 'UTC' !== date_default_timezone_get() ) { 1041 $result['status'] = 'critical'; 1042 1043 $result['label'] = __( 'PHP default timezone is invalid' ); 1044 1045 $result['description'] = sprintf( 1046 '<p>%s</p>', 1047 sprintf( 1048 /* translators: %s: date_default_timezone_set() */ 1049 __( 'PHP default timezone was changed after WordPress loading by a %s function call. This interferes with correct calculations of dates and times.' ), 1050 '<code>date_default_timezone_set()</code>' 1051 ) 1052 ); 1053 } 1054 1055 return $result; 1056 } 1057 1058 /** 1019 1059 * Test if the SQL server is up to date. 1020 1060 * … … 1843 1883 $tests = array( 1844 1884 'direct' => array( 1845 'wordpress_version' => array(1885 'wordpress_version' => array( 1846 1886 'label' => __( 'WordPress Version' ), 1847 1887 'test' => 'wordpress_version', 1848 1888 ), 1849 'plugin_version' => array(1889 'plugin_version' => array( 1850 1890 'label' => __( 'Plugin Versions' ), 1851 1891 'test' => 'plugin_version', 1852 1892 ), 1853 'theme_version' => array(1893 'theme_version' => array( 1854 1894 'label' => __( 'Theme Versions' ), 1855 1895 'test' => 'theme_version', 1856 1896 ), 1857 'php_version' => array(1897 'php_version' => array( 1858 1898 'label' => __( 'PHP Version' ), 1859 1899 'test' => 'php_version', 1860 1900 ), 1861 'sql_server' => array( 1901 'php_extensions' => array( 1902 'label' => __( 'PHP Extensions' ), 1903 'test' => 'php_extensions', 1904 ), 1905 'php_default_timezone' => array( 1906 'label' => __( 'PHP Default Timezone' ), 1907 'test' => 'php_default_timezone', 1908 ), 1909 'sql_server' => array( 1862 1910 'label' => __( 'Database Server version' ), 1863 1911 'test' => 'sql_server', 1864 1912 ), 1865 'php_extensions' => array( 1866 'label' => __( 'PHP Extensions' ), 1867 'test' => 'php_extensions', 1868 ), 1869 'utf8mb4_support' => array( 1913 'utf8mb4_support' => array( 1870 1914 'label' => __( 'MySQL utf8mb4 support' ), 1871 1915 'test' => 'utf8mb4_support', 1872 1916 ), 1873 'https_status' => array(1917 'https_status' => array( 1874 1918 'label' => __( 'HTTPS status' ), 1875 1919 'test' => 'https_status', 1876 1920 ), 1877 'ssl_support' => array(1921 'ssl_support' => array( 1878 1922 'label' => __( 'Secure communication' ), 1879 1923 'test' => 'ssl_support', 1880 1924 ), 1881 'scheduled_events' => array(1925 'scheduled_events' => array( 1882 1926 'label' => __( 'Scheduled events' ), 1883 1927 'test' => 'scheduled_events', 1884 1928 ), 1885 'http_requests' => array(1929 'http_requests' => array( 1886 1930 'label' => __( 'HTTP Requests' ), 1887 1931 'test' => 'http_requests', 1888 1932 ), 1889 'debug_enabled' => array(1933 'debug_enabled' => array( 1890 1934 'label' => __( 'Debugging enabled' ), 1891 1935 'test' => 'is_in_debug_mode',
Note: See TracChangeset
for help on using the changeset viewer.