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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
manage-tokens.php 2 months ago settings-log.php 2 months ago status.php 1 year ago tutor_pages.php 3 years ago
status.php
343 lines
1 <?php
2 /**
3 * Tools status page
4 *
5 * @package Tutor\Views
6 * @author Themeum <support@themeum.com>
7 * @link https://themeum.com
8 * @since 2.0.0
9 */
10
11 ?>
12 <div class="wrap">
13 <h2><?php esc_html_e( 'Tutor Environment Status', 'tutor' ); ?></h2>
14
15 <?php
16 $environment = \TUTOR\Admin::get_environment_info();
17 ?>
18
19 <table class="tutor_status_table widefat" cellspacing="0" id="status">
20 <thead>
21 <tr>
22 <th colspan="3" data-export-label="WordPress Environment"><h2><?php esc_html_e( 'WordPress environment', 'tutor' ); ?></h2></th>
23 </tr>
24 </thead>
25 <tbody>
26 <tr>
27 <td data-export-label="Home URL"><?php esc_html_e( 'Home URL', 'tutor' ); ?>:</td>
28 <td class="help">
29 <?php echo tutor_utils()->help_tip( esc_html__( 'The homepage URL of your site.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?>
30 </td>
31 <td><?php echo esc_html( $environment['home_url'] ); ?></td>
32 </tr>
33 <tr>
34 <td data-export-label="Site URL"><?php esc_html_e( 'Site URL', 'tutor' ); ?>:</td>
35 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The root URL of your site.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
36 <td><?php echo esc_html( $environment['site_url'] ); ?></td>
37 </tr>
38
39 <tr>
40 <td data-export-label="WP Version"><?php esc_html_e( 'WordPress version', 'tutor' ); ?>:</td>
41 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of WordPress installed on your site.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
42 <td>
43 <?php
44 $latest_version = get_transient( 'tutor_system_status_wp_version_check' );
45
46 if ( false === $latest_version ) {
47 $version_check = wp_remote_get( 'https://api.wordpress.org/core/version-check/1.7/' );
48 $api_response = json_decode( wp_remote_retrieve_body( $version_check ), true );
49
50 if ( $api_response && isset( $api_response['offers'], $api_response['offers'][0], $api_response['offers'][0]['version'] ) ) {
51 $latest_version = $api_response['offers'][0]['version'];
52 } else {
53 $latest_version = $environment['wp_version'];
54 }
55 set_transient( 'tutor_system_status_wp_version_check', $latest_version, DAY_IN_SECONDS );
56 }
57
58 if ( version_compare( $environment['wp_version'], $latest_version, '<' ) ) {
59 /* Translators: %1$s: Current version, %2$s: New version */
60 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>';
61 } else {
62 echo '<mark class="yes">' . esc_html( $environment['wp_version'] ) . '</mark>';
63 }
64 ?>
65 </td>
66 </tr>
67
68 <tr>
69 <td data-export-label="Tutor Version"><?php esc_html_e( 'Tutor Version', 'tutor' ); ?>:</td>
70 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of tutor.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
71 <td><mark class="yes"><?php echo esc_html( $environment['version'] ); ?></mark></td>
72 </tr>
73
74 <tr>
75 <td data-export-label="WP Multisite"><?php esc_html_e( 'WordPress multisite', 'tutor' ); ?>:</td>
76 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Whether or not you have WordPress Multisite enabled.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
77 <td><?php echo $environment['wp_multisite'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
78 </tr>
79 <tr>
80 <td data-export-label="WP Memory Limit"><?php esc_html_e( 'WordPress memory limit', 'tutor' ); ?>:</td>
81 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
82 <td>
83 <?php
84 if ( $environment['wp_memory_limit'] < 67108864 ) {
85 /* Translators: %1$s: Memory limit, %2$s: Docs link. */
86 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>';
87 } else {
88 echo '<mark class="yes">' . esc_html( size_format( $environment['wp_memory_limit'] ) ) . '</mark>';
89 }
90 ?>
91 </td>
92 </tr>
93 <tr>
94 <td data-export-label="WP Debug Mode"><?php esc_html_e( 'WordPress debug mode', 'tutor' ); ?>:</td>
95 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WordPress is in Debug Mode.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
96 <td>
97 <?php if ( $environment['wp_debug_mode'] ) : ?>
98 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
99 <?php else : ?>
100 <mark class="no">&ndash;</mark>
101 <?php endif; ?>
102 </td>
103 </tr>
104 <tr>
105 <td data-export-label="WP Cron"><?php esc_html_e( 'WordPress cron', 'tutor' ); ?>:</td>
106 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WP Cron Jobs are enabled.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
107 <td>
108 <?php if ( $environment['wp_cron'] ) : ?>
109 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
110 <?php else : ?>
111 <mark class="no">&ndash;</mark>
112 <?php endif; ?>
113 </td>
114 </tr>
115 <tr>
116 <td data-export-label="Language"><?php esc_html_e( 'Language', 'tutor' ); ?>:</td>
117 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The current language used by WordPress. Default = English', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
118 <td><?php echo esc_html( $environment['language'] ); ?></td>
119 </tr>
120 <tr>
121 <td data-export-label="External object cache"><?php esc_html_e( 'External object cache', 'tutor' ); ?>:</td>
122 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Displays whether or not WordPress is using an external object cache.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
123 <td>
124 <?php if ( $environment['external_object_cache'] ) : ?>
125 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
126 <?php else : ?>
127 <mark class="no">&ndash;</mark>
128 <?php endif; ?>
129 </td>
130 </tr>
131 </tbody>
132 </table>
133
134
135 <table class="tutor_status_table widefat" cellspacing="0">
136 <thead>
137 <tr>
138 <th colspan="3" data-export-label="Server Environment">
139 <h2><?php esc_html_e( 'Server environment', 'tutor' ); ?></h2>
140 </th>
141 </tr>
142 </thead>
143 <tbody>
144 <tr>
145 <td data-export-label="Server Info"><?php esc_html_e( 'Server info', 'tutor' ); ?>:</td>
146 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'Information about the web server that is currently hosting your site.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
147 <td><?php echo esc_html( $environment['server_info'] ); ?></td>
148 </tr>
149 <tr>
150 <td data-export-label="PHP Version"><?php esc_html_e( 'PHP version', 'tutor' ); ?>:</td>
151 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of PHP installed on your hosting server.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
152 <td>
153 <?php
154 if ( version_compare( $environment['php_version'], '7.2', '>=' ) ) {
155 echo '<mark class="yes">' . esc_html( $environment['php_version'] ) . '</mark>';
156 } else {
157 $class = 'error';
158
159 if ( version_compare( $environment['php_version'], '5.6', '<' ) ) {
160 $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' );
161 } elseif ( version_compare( $environment['php_version'], '7.2', '<' ) ) {
162 $notice = __( 'We recommend using PHP version 7.2 or above for greater performance and security.', 'tutor' );
163 $class = 'recommendation';
164 }
165
166 echo '<mark class="' . esc_attr( $class ) . '">' . esc_html( $environment['php_version'] ) . ' - ' . wp_kses_post( $notice ) . '</mark>';
167 }
168 ?>
169 </td>
170 </tr>
171 <?php if ( function_exists( 'ini_get' ) ) : ?>
172 <tr>
173 <td data-export-label="PHP Post Max Size"><?php esc_html_e( 'PHP post max size', 'tutor' ); ?>:</td>
174 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The largest filesize that can be contained in one post.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
175 <td><?php echo esc_html( size_format( $environment['php_post_max_size'] ) ); ?></td>
176 </tr>
177 <tr>
178 <td data-export-label="PHP Time Limit"><?php esc_html_e( 'PHP time limit', 'tutor' ); ?>:</td>
179 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
180 <td><?php echo esc_html( $environment['php_max_execution_time'] ); ?></td>
181 </tr>
182 <tr>
183 <td data-export-label="PHP Max Input Vars"><?php esc_html_e( 'PHP max input vars', 'tutor' ); ?>:</td>
184 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
185 <td><?php echo esc_html( $environment['php_max_input_vars'] ); ?></td>
186 </tr>
187 <tr>
188 <td data-export-label="cURL Version"><?php esc_html_e( 'cURL version', 'tutor' ); ?>:</td>
189 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of cURL installed on your server.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
190 <td><?php echo esc_html( $environment['curl_version'] ); ?></td>
191 </tr>
192 <tr>
193 <td data-export-label="SUHOSIN Installed"><?php esc_html_e( 'SUHOSIN installed', 'tutor' ); ?>:</td>
194 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
195 <td>
196 <?php
197 echo $environment['suhosin_installed'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;';
198 ?>
199 </td>
200 </tr>
201 <?php endif; ?>
202
203 <?php
204
205 if ( $environment['mysql_version'] ) :
206 ?>
207 <tr>
208 <td data-export-label="MySQL Version"><?php esc_html_e( 'MySQL version', 'tutor' ); ?>:</td>
209 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The version of MySQL installed on your hosting server.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
210 <td>
211 <?php
212 if ( version_compare( $environment['mysql_version'], '5.6', '<' ) && ! strstr( $environment['mysql_version_string'], 'MariaDB' ) ) {
213 echo '<mark class="error">
214 <span class="dashicons dashicons-warning"></span> ' .
215 /* translators: %1$s: MySQL version number, %2$s: WordPress requirements URL */
216 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>' ) .
217 '</mark>';
218 } else {
219 echo '<mark class="yes">' . esc_html( $environment['mysql_version_string'] ) . '</mark>';
220 }
221 ?>
222 </td>
223 </tr>
224 <?php endif; ?>
225 <tr>
226 <td data-export-label="Max Upload Size"><?php esc_html_e( 'Max upload size', 'tutor' ); ?>:</td>
227 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The largest filesize that can be uploaded to your WordPress installation.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
228 <td><?php echo esc_html( size_format( $environment['max_upload_size'] ) ); ?></td>
229 </tr>
230 <tr>
231 <td data-export-label="Default Timezone is UTC"><?php esc_html_e( 'Default timezone is UTC', 'tutor' ); ?>:</td>
232 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'The default timezone for your server.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
233 <td>
234 <?php
235 if ( 'UTC' !== $environment['default_timezone'] ) {
236 /* translators: %s: default timezone */
237 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>';
238 } else {
239 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
240 }
241 ?>
242 </td>
243 </tr>
244 <tr>
245 <td data-export-label="fsockopen/cURL"><?php esc_html_e( 'fsockopen/cURL', 'tutor' ); ?>:</td>
246 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
247 <td>
248 <?php
249 if ( $environment['fsockopen_or_curl_enabled'] ) {
250 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
251 } else {
252 echo '<mark class="error">
253 <span class="dashicons dashicons-warning"></span> ' .
254 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' ) .
255 '</mark>';
256 }
257 ?>
258 </td>
259 </tr>
260 <tr>
261 <td data-export-label="DOMDocument"><?php esc_html_e( 'DOMDocument', 'tutor' ); ?>:</td>
262 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
263 <td>
264 <?php
265 if ( $environment['domdocument_enabled'] ) {
266 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
267 } else {
268 echo '<mark class="error">
269 <span class="dashicons dashicons-warning"></span> ' .
270 /* translators: %s: classname and link. */
271 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>' ) .
272 '</mark>';
273 }
274 ?>
275 </td>
276 </tr>
277 <tr>
278 <td data-export-label="GZip"><?php esc_html_e( 'GZip', 'tutor' ); ?>:</td>
279 <td class="help"><?php echo tutor_utils()->help_tip( esc_html__( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'tutor' ) ); //phpcs:ignore -- contain safe data ?></td>
280 <td>
281 <?php
282 if ( $environment['gzip_enabled'] ) {
283 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
284 } else {
285 echo '<mark class="error">
286 <span class="dashicons dashicons-warning"></span> ' .
287 /* translators: %s: classname and link. */
288 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>' ) .
289 '</mark>';
290 }
291 ?>
292 </td>
293 </tr>
294 <tr>
295 <td data-export-label="Multibyte String"><?php esc_html_e( 'Multibyte string', 'tutor' ); ?>:</td>
296 <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' ) ); //phpcs:ignore -- contain safe data ?></td>
297 <td>
298 <?php
299 if ( $environment['mbstring_enabled'] ) {
300 echo '<mark class="yes">
301 <span class="dashicons dashicons-yes"></span>
302 </mark>';
303 } else {
304 echo '<mark class="error">
305 <span class="dashicons dashicons-warning"></span> ' .
306 /* translators: %s: classname and link. */
307 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>' ) .
308 '</mark>';
309 }
310 ?>
311 </td>
312 </tr>
313 </tbody>
314 </table>
315
316 <table class="tutor_status_table widefat" cellspacing="0">
317 <thead>
318 <tr>
319 <th colspan="3" data-export-label="Templates">
320 <h2>Templates </h2>
321 </th>
322 </tr>
323 </thead>
324 <tbody>
325 <tr>
326 <td data-export-label="Overrides">Overrides</td>
327 <td class="help">&nbsp;</td>
328 <td>
329 <?php
330 $override_files = \TUTOR\Admin::template_overridden_files();
331 if ( is_array( $override_files ) && count( $override_files ) ) {
332 foreach ( $override_files as $file ) {
333 echo esc_attr( $file ) . ',<br />';
334 }
335 }
336 ?>
337 </td>
338 </tr>
339 </tbody>
340 </table>
341
342 </div>
343