PluginProbe
Pronamic Client / trunk
Pronamic Client vtrunk
2.4.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.5.0 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 All 54 releases
pronamic-client / admin / checklist.php

checklist.php in Pronamic Client trunk, at admin/checklist.php

446 lines 10.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wrap">
2 <h1><?php echo get_admin_page_title(); ?></h1>
3
4 <?php
5
6 $language = get_locale();
7 $is_dutch = 'nl_NL' === $language;
8 $timezone = get_option( 'timezone_string' );
9 $blog_public = get_option( 'blog_public' );
10 $category_base = get_option( 'category_base' );
11
12 ?>
13 <table class="pronamic-status-table widefat striped" cellspacing="0">
14 <thead>
15 <tr>
16 <th colspan="2"><?php _e( 'WordPress', 'pronamic-client' ); ?></th>
17 </tr>
18 </thead>
19
20 <tbody>
21 <tr>
22 <th scope="row">
23 <?php _e( 'Language', 'pronamic-client' ); ?>
24 </th>
25 <td>
26 <span class="dashicons dashicons-yes"></span> <?php echo $language; ?>
27 </td>
28 </tr>
29 <tr>
30 <th scope="row">
31 <?php _e( 'Is Dutch', 'pronamic-client' ); ?>
32 </th>
33 <td>
34 <?php if ( $is_dutch ) : ?>
35
36 <span class="dashicons dashicons-yes"></span>
37
38 <?php endif; ?>
39 </td>
40 </tr>
41 <tr>
42 <th scope="row">
43 <?php _e( 'Timezone', 'pronamic-client' ); ?>
44 </th>
45 <td>
46 <?php if ( $is_dutch && 'Europe/Amsterdam' === $timezone ) : ?>
47
48 <span class="dashicons dashicons-yes"></span>
49
50 <?php endif; ?>
51
52 <?php echo $timezone; ?>
53 </td>
54 </tr>
55 <tr>
56 <th scope="row">
57 <?php _e( 'Site Visibility', 'pronamic-client' ); ?>
58 </th>
59 <td>
60 <?php if ( $blog_public ) : ?>
61
62 <span class="dashicons dashicons-yes"></span>
63
64 <?php endif; ?>
65
66 <?php $blog_public ? esc_html_e( 'Public', 'pronamic-client' ) : esc_html_e( 'Private', 'pronamic-client' ); ?>
67 </td>
68 </tr>
69 <tr>
70 <th scope="row">
71 <?php _e( 'Category Base', 'pronamic-client' ); ?>
72 </th>
73 <td>
74 <?php if ( $is_dutch && 'categorie' === $category_base ) : ?>
75
76 <span class="dashicons dashicons-yes"></span>
77
78 <?php endif; ?>
79
80 <?php echo $category_base; ?>
81 </td>
82 </tr>
83 </tbody>
84 </table>
85
86 <table class="pronamic-status-table widefat striped" cellspacing="0">
87 <thead>
88 <tr>
89 <th colspan="2"><?php _e( 'Config', 'pronamic-client' ); ?></th>
90 </tr>
91 </thead>
92
93 <tbody>
94 <?php
95
96 $constants = [
97 'WPLANG',
98 'WP_DEBUG',
99 'SCRIPT_DEBUG',
100 'SAVEQUERIES',
101 'JETPACK_DEV_DEBUG',
102 'WP_MEMORY_LIMIT',
103 'WP_MAX_MEMORY_LIMIT',
104 ];
105
106 foreach ( $constants as $constant ) :
107 ?>
108
109 <tr>
110 <th scope="row">
111 <code><?php echo esc_html( $constant ); ?></code>
112 </th>
113 <td>
114 <?php if ( ! defined( $constant ) || false === constant( $constant ) ) : ?>
115
116 <span class="dashicons dashicons-yes"></span>
117
118 <?php endif; ?>
119
120 <code><?php echo esc_html( defined( $constant ) ? constant( $constant ) : '' ); ?></code>
121 </td>
122 </tr>
123
124 <?php endforeach; ?>
125
126 </tbody>
127 </table>
128
129 <table class="pronamic-status-table widefat striped" cellspacing="0">
130 <thead>
131 <tr>
132 <th colspan="2"><?php _e( 'Theme', 'pronamic-client' ); ?></th>
133 </tr>
134 </thead>
135
136 <tbody>
137 <tr>
138 <?php
139
140 $header_file = get_template_directory() . '/header.php';
141 $header_file_content = file_get_contents( $header_file, true );
142 $has_wp_head_function = strpos( $header_file_content, 'wp_head();' );
143
144 ?>
145 <th scope="row">
146 <?php
147
148 printf(
149 /* translators: 1: name, 2: filename */
150 __( 'Function %1$s in %2$s', 'pronamic-client' ),
151 '<code>wp_head();</code>',
152 '<code>header.php</code>'
153 );
154
155 ?>
156 </th>
157 <td>
158 <span class="dashicons dashicons-<?php echo esc_attr( $has_wp_head_function ? 'yes' : 'no' ); ?>"></span>
159
160 <?php $has_wp_head_function ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
161 </td>
162 </tr>
163 <tr>
164 <?php
165
166 $footer_file = get_template_directory() . '/footer.php';
167 $footer_file_content = file_get_contents( $footer_file, true );
168 $has_wp_footer_function = strpos( $footer_file_content, 'wp_footer();' );
169
170 ?>
171 <th scope="row">
172 <?php
173
174 printf(
175 /* translators: 1: name, 2: filename */
176 __( 'Function %1$s in %2$s', 'pronamic-client' ),
177 '<code>wp_footer();</code>',
178 '<code>footer.php</code>'
179 );
180
181 ?>
182 </th>
183 <td>
184 <span class="dashicons dashicons-<?php echo esc_attr( $has_wp_footer_function ? 'yes' : 'no' ); ?>"></span>
185
186 <?php $has_wp_footer_function ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
187 </td>
188 </tr>
189 <tr>
190 <?php
191
192 $theme_support_html5 = get_theme_support( 'html5' );
193
194 ?>
195 <th scope="row">
196 <?php _e( 'Theme Support HTML5', 'pronamic-client' ); ?>
197 </th>
198 <td>
199 <?php if ( $theme_support_html5 ) : ?>
200
201 <span class="dashicons dashicons-yes"></span>
202
203 <?php endif; ?>
204
205 <?php $theme_support_html5 ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
206 </td>
207 </tr>
208 <tr>
209 <?php
210
211 $theme_support_title_tag = get_theme_support( 'title-tag' );
212
213 ?>
214 <th scope="row">
215 <?php _e( 'Theme Support Title Tag', 'pronamic-client' ); ?>
216 </th>
217 <td>
218 <?php if ( $theme_support_title_tag ) : ?>
219
220 <span class="dashicons dashicons-yes"></span>
221
222 <?php endif; ?>
223
224 <?php $theme_support_title_tag ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
225 </td>
226 </tr>
227 </tbody>
228 </table>
229
230 <table class="pronamic-status-table widefat striped" cellspacing="0">
231 <thead>
232 <tr>
233 <th colspan="2"><?php _e( 'Users', 'pronamic-client' ); ?></th>
234 </tr>
235 </thead>
236
237 <tbody>
238 <tr>
239 <?php
240
241 $user_pronamic = get_user_by( 'login', 'pronamic' );
242 $has_user_pronamic = false !== $user_pronamic;
243
244 ?>
245 <th scope="row">
246 <?php _e( 'WordPress user \'pronamic\'', 'pronamic-client' ); ?>
247 </th>
248 <td>
249 <?php if ( $has_user_pronamic ) : ?>
250
251 <span class="dashicons dashicons-yes"></span>
252
253 <?php endif; ?>
254
255 <?php $has_user_pronamic ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
256 </td>
257 </tr>
258
259 <?php if ( false !== $user_pronamic ) : ?>
260
261 <tr>
262 <?php
263
264 $has_email_pronamic = 'info@pronamic.nl' === $user_pronamic->user_email;
265
266 ?>
267 <th scope="row">
268 <?php _e( 'WordPress user \'pronamic\' email \'info@pronamic.nl\'', 'pronamic-client' ); ?>
269 </th>
270 <td>
271 <?php if ( $has_email_pronamic ) : ?>
272
273 <span class="dashicons dashicons-yes"></span>
274
275 <?php endif; ?>
276
277 <?php echo esc_html( $user_pronamic->user_email ); ?>
278 </td>
279 </tr>
280
281 <?php endif; ?>
282
283 <tr>
284 <?php
285
286 $role_manager = get_role( 'manager' );
287 $has_role_manager = null !== $role_manager;
288
289 ?>
290 <th scope="row">
291 <?php _e( 'WordPress user role \'manager\'', 'pronamic-client' ); ?>
292 </th>
293 <td>
294 <?php if ( $has_role_manager ) : ?>
295
296 <span class="dashicons dashicons-yes"></span>
297
298 <?php endif; ?>
299
300 <?php $has_role_manager ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
301 </td>
302 </tr>
303 </tbody>
304 </table>
305
306 <table class="pronamic-status-table widefat striped" cellspacing="0">
307 <thead>
308 <tr>
309 <th colspan="2"><?php _e( 'Gravity Forms', 'pronamic-client' ); ?></th>
310 </tr>
311 </thead>
312
313 <tbody>
314 <tr>
315 <?php
316
317 $rg_gforms_enable_html5 = (bool) get_option( 'rg_gforms_enable_html5' );
318
319 ?>
320 <th scope="row">
321 <?php _e( 'Gravity Forms Output HTML5', 'pronamic-client' ); ?>
322 </th>
323 <td>
324 <?php if ( $rg_gforms_enable_html5 ) : ?>
325
326 <span class="dashicons dashicons-yes"></span>
327
328 <?php endif; ?>
329
330 <?php $rg_gforms_enable_html5 ? esc_html_e( 'Yes', 'pronamic-client' ) : esc_html_e( 'No', 'pronamic-client' ); ?>
331 </td>
332 </tr>
333 <tr>
334 <?php
335
336 $rg_gforms_currency = get_option( 'rg_gforms_currency' );
337
338 ?>
339 <th scope="row">
340 <?php _e( 'Gravity Forms Currency', 'pronamic-client' ); ?>
341 </th>
342 <td>
343 <?php if ( $is_dutch && 'EUR' === $rg_gforms_currency ) : ?>
344
345 <span class="dashicons dashicons-yes"></span>
346
347 <?php endif; ?>
348
349 <code><?php echo esc_html( $rg_gforms_currency ); ?></code>
350 </td>
351 </tr>
352 </tbody>
353 </table>
354
355 <?php
356
357 $plugin_suggestions = [
358 'google-analytics-for-wordpress/googleanalytics.php' => [
359 'slug' => 'google-analytics-for-wordpress',
360 'name' => 'Google Analytics for WordPress',
361 ],
362 'wordpress-seo/wp-seo.php' => [
363 'slug' => 'wordpress-seo',
364 'name' => 'WordPress SEO by Yoast',
365 ],
366 'gravityforms/gravityforms.php' => [
367 'slug' => 'gravityforms',
368 'name' => 'Gravity Forms',
369 ],
370 'gravityforms-nl/gravityforms-nl.php' => [
371 'slug' => 'gravityforms-nl',
372 'name' => 'Gravity Forms (nl)',
373 ],
374 'akismet/akismet.php' => [
375 'slug' => 'akismet',
376 'name' => 'Akismet',
377 ],
378 'iwp-client/init.php' => [
379 'slug' => 'iwp-client',
380 'name' => 'InfiniteWP Client',
381 ],
382 'sucuri-scanner/sucuri.php' => [
383 'slug' => 'sucuri-scanner',
384 'name' => 'Sucuri Scanner',
385 ],
386 'regenerate-thumbnails/regenerate-thumbnails.php' => [
387 'slug' => 'regenerate-thumbnails',
388 'name' => 'Regenerate Thumbnails',
389 ],
390 'wp-rocket/wp-rocket.php' => [
391 'slug' => 'wp-rocket',
392 'name' => 'WP Rocket',
393 ],
394 ];
395
396 ?>
397
398 <table class="pronamic-status-table widefat striped" cellspacing="0">
399 <thead>
400 <tr>
401 <th colspan="3"><?php _e( 'Plugins', 'pronamic-client' ); ?></th>
402 </tr>
403 </thead>
404
405 <tbody>
406
407 <?php foreach ( $plugin_suggestions as $file => $data ) : ?>
408
409 <tr>
410 <th scope="row">
411 <?php echo $data['name']; ?>
412 </th>
413 <td>
414 <?php if ( is_plugin_active( $file ) ) : ?>
415
416 <span class="dashicons dashicons-yes"></span>
417
418 <?php else : ?>
419
420 <?php
421
422 $search_url = add_query_arg(
423 [
424 'tab' => 'search',
425 'type' => 'term',
426 's' => $data['slug'],
427 ],
428 'plugin-install.php'
429 );
430
431 ?>
432 <a href="<?php echo esc_url( $search_url ); ?>">
433 <?php esc_html_e( 'Search Plugin', 'pronamic-client' ); ?>
434 </a>
435
436 <?php endif; ?>
437
438 </td>
439 </tr>
440
441 <?php endforeach; ?>
442
443 </tbody>
444 </table>
445 </div>
446