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.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / views / pages / tools / status.php
tutor / views / pages / tools Last commit date
status.php 4 years ago tutor_pages.php 4 years ago
status.php
335 lines
1
2 <div class="wrap">
3 <h2><?php _e( 'Tutor Environment Status', 'tutor' ); ?></h2>
4
5 <?php
6 $environment = \TUTOR\Admin::get_environment_info();
7 ?>
8
9 <table class="tutor_status_table widefat" cellspacing="0" id="status">
10 <thead>
11 <tr>
12 <th colspan="3" data-export-label="WordPress Environment"><h2><?php esc_html_e( 'WordPress environment', 'tutor' ); ?></h2></th>
13 </tr>
14 </thead>
15 <tbody>
16 <tr>
17 <td data-export-label="Home URL"><?php esc_html_e( 'Home URL', 'tutor' ); ?>:</td>
18 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The homepage URL of your site.', 'tutor' ) ); ?></td>
19 <td><?php echo esc_html( $environment['home_url'] ); ?></td>
20 </tr>
21 <tr>
22 <td data-export-label="Site URL"><?php esc_html_e( 'Site URL', 'tutor' ); ?>:</td>
23 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The root URL of your site.', 'tutor' ) ); ?></td>
24 <td><?php echo esc_html( $environment['site_url'] ); ?></td>
25 </tr>
26
27 <tr>
28 <td data-export-label="WP Version"><?php esc_html_e( 'WordPress version', 'tutor' ); ?>:</td>
29 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of WordPress installed on your site.', 'tutor' ) ); ?></td>
30 <td>
31 <?php
32 $latest_version = get_transient( 'tutor_system_status_wp_version_check' );
33
34 if ( false === $latest_version ) {
35 $version_check = wp_remote_get( 'https://api.wordpress.org/core/version-check/1.7/' );
36 $api_response = json_decode( wp_remote_retrieve_body( $version_check ), true );
37
38 if ( $api_response && isset( $api_response['offers'], $api_response['offers'][0], $api_response['offers'][0]['version'] ) ) {
39 $latest_version = $api_response['offers'][0]['version'];
40 } else {
41 $latest_version = $environment['wp_version'];
42 }
43 set_transient( 'tutor_system_status_wp_version_check', $latest_version, DAY_IN_SECONDS );
44 }
45
46 if ( version_compare( $environment['wp_version'], $latest_version, '<' ) ) {
47 /* Translators: %1$s: Current version, %2$s: New version */
48 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - There is a newer version of WordPress available (%2$s)', 'tutor' ), esc_html( $environment['wp_version'] ), esc_html( $latest_version ) ) . '</mark>';
49 } else {
50 echo '<mark class="yes">' . esc_html( $environment['wp_version'] ) . '</mark>';
51 }
52 ?>
53 </td>
54 </tr>
55
56 <tr>
57 <td data-export-label="Tutor Version"><?php esc_html_e( 'Tutor Version', 'tutor' ); ?>:</td>
58 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of tutor.', 'tutor' ) ); ?></td>
59 <td><mark class="yes"><?php echo esc_html( $environment['version'] ); ?></mark></td>
60 </tr>
61
62 <tr>
63 <td data-export-label="WP Multisite"><?php esc_html_e( 'WordPress multisite', 'tutor' ); ?>:</td>
64 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Whether or not you have WordPress Multisite enabled.', 'tutor' ) ); ?></td>
65 <td><?php echo $environment['wp_multisite'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
66 </tr>
67 <tr>
68 <td data-export-label="WP Memory Limit"><?php esc_html_e( 'WordPress memory limit', 'tutor' ); ?>:</td>
69 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The maximum amount of memory (RAM) that your site can use at one time.', 'tutor' ) ); ?></td>
70 <td>
71 <?php
72 if ( $environment['wp_memory_limit'] < 67108864 ) {
73 /* Translators: %1$s: Memory limit, %2$s: Docs link. */
74 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: %2$s', 'tutor' ), esc_html( size_format( $environment['wp_memory_limit'] ) ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">' . esc_html__( 'Increasing memory allocated to PHP', 'tutor' ) . '</a>' ) . '</mark>';
75 } else {
76 echo '<mark class="yes">' . esc_html( size_format( $environment['wp_memory_limit'] ) ) . '</mark>';
77 }
78 ?>
79 </td>
80 </tr>
81 <tr>
82 <td data-export-label="WP Debug Mode"><?php esc_html_e( 'WordPress debug mode', 'tutor' ); ?>:</td>
83 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WordPress is in Debug Mode.', 'tutor' ) ); ?></td>
84 <td>
85 <?php if ( $environment['wp_debug_mode'] ) : ?>
86 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
87 <?php else : ?>
88 <mark class="no">&ndash;</mark>
89 <?php endif; ?>
90 </td>
91 </tr>
92 <tr>
93 <td data-export-label="WP Cron"><?php esc_html_e( 'WordPress cron', 'tutor' ); ?>:</td>
94 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WP Cron Jobs are enabled.', 'tutor' ) ); ?></td>
95 <td>
96 <?php if ( $environment['wp_cron'] ) : ?>
97 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
98 <?php else : ?>
99 <mark class="no">&ndash;</mark>
100 <?php endif; ?>
101 </td>
102 </tr>
103 <tr>
104 <td data-export-label="Language"><?php esc_html_e( 'Language', 'tutor' ); ?>:</td>
105 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The current language used by WordPress. Default = English', 'tutor' ) ); ?></td>
106 <td><?php echo esc_html( $environment['language'] ); ?></td>
107 </tr>
108 <tr>
109 <td data-export-label="External object cache"><?php esc_html_e( 'External object cache', 'tutor' ); ?>:</td>
110 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WordPress is using an external object cache.', 'tutor' ) ); ?></td>
111 <td>
112 <?php if ( $environment['external_object_cache'] ) : ?>
113 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
114 <?php else : ?>
115 <mark class="no">&ndash;</mark>
116 <?php endif; ?>
117 </td>
118 </tr>
119 </tbody>
120 </table>
121
122
123 <table class="tutor_status_table widefat" cellspacing="0">
124 <thead>
125 <tr>
126 <th colspan="3" data-export-label="Server Environment">
127 <h2><?php esc_html_e( 'Server environment', 'tutor' ); ?></h2>
128 </th>
129 </tr>
130 </thead>
131 <tbody>
132 <tr>
133 <td data-export-label="Server Info"><?php esc_html_e( 'Server info', 'tutor' ); ?>:</td>
134 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Information about the web server that is currently hosting your site.', 'tutor' ) ); ?></td>
135 <td><?php echo esc_html( $environment['server_info'] ); ?></td>
136 </tr>
137 <tr>
138 <td data-export-label="PHP Version"><?php _e( 'PHP version', 'tutor' ); ?>:</td>
139 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of PHP installed on your hosting server.', 'tutor' ) ); ?></td>
140 <td>
141 <?php
142 if ( version_compare( $environment['php_version'], '7.2', '>=' ) ) {
143 echo '<mark class="yes">' . esc_html( $environment['php_version'] ) . '</mark>';
144 } else {
145 $class = 'error';
146
147 if ( version_compare( $environment['php_version'], '5.6', '<' ) ) {
148 $notice = '<span class="dashicons dashicons-warning"></span> ' . __( 'Tutor will run under this version of PHP, however, it has reached end of life. We recommend using PHP version 7.2 or above for greater performance and security.', 'tutor' );
149 } elseif ( version_compare( $environment['php_version'], '7.2', '<' ) ) {
150 $notice = __( 'We recommend using PHP version 7.2 or above for greater performance and security.', 'tutor' );
151 $class = 'recommendation';
152 }
153
154 echo '<mark class="' . $class . '">' . esc_html( $environment['php_version'] ) . ' - ' . wp_kses_post( $notice ) . '</mark>';
155 }
156 ?>
157 </td>
158 </tr>
159 <?php if ( function_exists( 'ini_get' ) ) : ?>
160 <tr>
161 <td data-export-label="PHP Post Max Size"><?php esc_html_e( 'PHP post max size', 'tutor' ); ?>:</td>
162 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The largest filesize that can be contained in one post.', 'tutor' ) ); ?></td>
163 <td><?php echo esc_html( size_format( $environment['php_post_max_size'] ) ); ?></td>
164 </tr>
165 <tr>
166 <td data-export-label="PHP Time Limit"><?php esc_html_e( 'PHP time limit', 'tutor' ); ?>:</td>
167 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'tutor' ) ); ?></td>
168 <td><?php echo esc_html( $environment['php_max_execution_time'] ); ?></td>
169 </tr>
170 <tr>
171 <td data-export-label="PHP Max Input Vars"><?php esc_html_e( 'PHP max input vars', 'tutor' ); ?>:</td>
172 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'tutor' ) ); ?></td>
173 <td><?php echo esc_html( $environment['php_max_input_vars'] ); ?></td>
174 </tr>
175 <tr>
176 <td data-export-label="cURL Version"><?php esc_html_e( 'cURL version', 'tutor' ); ?>:</td>
177 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of cURL installed on your server.', 'tutor' ) ); ?></td>
178 <td><?php echo esc_html( $environment['curl_version'] ); ?></td>
179 </tr>
180 <tr>
181 <td data-export-label="SUHOSIN Installed"><?php esc_html_e( 'SUHOSIN installed', 'tutor' ); ?>:</td>
182 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'tutor' ) ); ?></td>
183 <td>
184 <?php
185 echo $environment['suhosin_installed'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;';
186 ?>
187 </td>
188 </tr>
189 <?php endif; ?>
190
191 <?php
192
193 if ( $environment['mysql_version'] ) :
194 ?>
195 <tr>
196 <td data-export-label="MySQL Version"><?php esc_html_e( 'MySQL version', 'tutor' ); ?>:</td>
197 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of MySQL installed on your hosting server.', 'tutor' ) ); ?></td>
198 <td>
199 <?php
200 if ( version_compare( $environment['mysql_version'], '5.6', '<' ) && ! strstr( $environment['mysql_version_string'], 'MariaDB' ) ) {
201 /* Translators: %1$s: MySQL version, %2$s: Recommended MySQL version. */
202 echo '<mark class="error">
203 <span class="dashicons dashicons-warning"></span> ' .
204 sprintf( esc_html__( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s', 'tutor' ), esc_html( $environment['mysql_version_string'] ), '<a href="https://wordpress.org)/about/requirements/" target="_blank">' . esc_html__( 'WordPress requirements', 'tutor' ) . '</a>' ) .
205 '</mark>';
206 } else {
207 echo '<mark class="yes">' . esc_html( $environment['mysql_version_string'] ) . '</mark>';
208 }
209 ?>
210 </td>
211 </tr>
212 <?php endif; ?>
213 <tr>
214 <td data-export-label="Max Upload Size"><?php esc_html_e( 'Max upload size', 'tutor' ); ?>:</td>
215 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The largest filesize that can be uploaded to your WordPress installation.', 'tutor' ) ); ?></td>
216 <td><?php echo esc_html( size_format( $environment['max_upload_size'] ) ); ?></td>
217 </tr>
218 <tr>
219 <td data-export-label="Default Timezone is UTC"><?php esc_html_e( 'Default timezone is UTC', 'tutor' ); ?>:</td>
220 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The default timezone for your server.', 'tutor' ) ); ?></td>
221 <td>
222 <?php
223 if ( 'UTC' !== $environment['default_timezone'] ) {
224 /* Translators: %s: default timezone.. */
225 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'tutor' ), esc_html( $environment['default_timezone'] ) ) . '</mark>';
226 } else {
227 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
228 }
229 ?>
230 </td>
231 </tr>
232 <tr>
233 <td data-export-label="fsockopen/cURL"><?php esc_html_e( 'fsockopen/cURL', 'tutor' ); ?>:</td>
234 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'tutor' ) ); ?></td>
235 <td>
236 <?php
237 if ( $environment['fsockopen_or_curl_enabled'] ) {
238 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
239 } else {
240 echo '<mark class="error">
241 <span class="dashicons dashicons-warning"></span> ' .
242 esc_html__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'tutor' ) .
243 '</mark>';
244 }
245 ?>
246 </td>
247 </tr>
248 <tr>
249 <td data-export-label="DOMDocument"><?php esc_html_e( 'DOMDocument', 'tutor' ); ?>:</td>
250 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'tutor' ) ); ?></td>
251 <td>
252 <?php
253 if ( $environment['domdocument_enabled'] ) {
254 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
255 } else {
256 /* Translators: %s: classname and link. */
257 echo '<mark class="error">
258 <span class="dashicons dashicons-warning"></span> ' .
259 sprintf( esc_html__( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'tutor' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' ) .
260 '</mark>';
261 }
262 ?>
263 </td>
264 </tr>
265 <tr>
266 <td data-export-label="GZip"><?php esc_html_e( 'GZip', 'tutor' ); ?>:</td>
267 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'tutor' ) ); ?></td>
268 <td>
269 <?php
270 if ( $environment['gzip_enabled'] ) {
271 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
272 } else {
273 /* Translators: %s: classname and link. */
274 echo '<mark class="error">
275 <span class="dashicons dashicons-warning"></span> ' .
276 sprintf( esc_html__( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'tutor' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' ) .
277 '</mark>';
278 }
279 ?>
280 </td>
281 </tr>
282 <tr>
283 <td data-export-label="Multibyte String"><?php esc_html_e( 'Multibyte string', 'tutor' ); ?>:</td>
284 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'tutor' ) ); ?></td>
285 <td>
286 <?php
287 if ( $environment['mbstring_enabled'] ) {
288 echo '<mark class="yes">
289 <span class="dashicons dashicons-yes"></span>
290 </mark>';
291 } else {
292 /* Translators: %s: classname and link. */
293 echo '<mark class="error">
294 <span class="dashicons dashicons-warning"></span> ' .
295 sprintf( esc_html__( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'tutor' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' ) .
296 '</mark>';
297 }
298 ?>
299 </td>
300 </tr>
301 </tbody>
302 </table>
303
304
305
306
307
308 <table class="tutor_status_table widefat" cellspacing="0">
309 <thead>
310 <tr>
311 <th colspan="3" data-export-label="Templates">
312 <h2>Templates </h2>
313 </th>
314 </tr>
315 </thead>
316 <tbody>
317 <tr>
318 <td data-export-label="Overrides">Overrides</td>
319 <td class="help">&nbsp;</td>
320 <td>
321 <?php
322 $override_files = \TUTOR\Admin::template_overridden_files();
323 if ( is_array( $override_files ) && count( $override_files ) ) {
324 foreach ( $override_files as $file ) {
325 echo esc_attr( $file ) . ',<br />';
326 }
327 }
328 ?>
329 </td>
330 </tr>
331 </tbody>
332 </table>
333
334 </div>
335