PluginProbe
phpinfo() WP – Site Health, PHP Compatibility & Server Audit / 7.2.5
phpinfo() WP – Site Health, PHP Compatibility & Server Audit v7.2.5
7.2.7 7.2.6 7.2.5 7.2.4 7.2.3 7.2.0 7.2.1 7.2.2 7.1.0 7.0.3 7.0.4 7.0.5 trunk 6.0 7.0.0 7.0.1 7.0.2
phpinfo-wp / views / pro / eol.php

eol.php in phpinfo() WP – Site Health, PHP Compatibility & Server Audit 7.2.5, at views/pro/eol.php

125 lines 8.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') or die('Unauthorized Access');
3
4 $is_pro = Phpinfo_WP_License::is_valid();
5 $current = Phpinfo_WP_EOL::status();
6 $timeline = Phpinfo_WP_EOL::timeline();
7
8 $status_labels = [
9 'eol' => ['label' => __('End of Life', 'phpinfo-wp'), 'class' => 'eol-status-eol'],
10 'warning' => ['label' => __('EOL < 90 days', 'phpinfo-wp'), 'class' => 'eol-status-warning'],
11 'ok' => ['label' => __('Supported', 'phpinfo-wp'), 'class' => 'eol-status-ok'],
12 'unknown' => ['label' => __('Unknown', 'phpinfo-wp'), 'class' => 'eol-status-unknown'],
13 ];
14 ?>
15
16 <div class="phpinfowp-pro-page">
17
18 <div class="phpinfowp-page-header">
19 <div>
20 <h1><?php _e('PHP EOL Timeline', 'phpinfo-wp'); ?></h1>
21 <p class="phpinfowp-page-subtitle"><?php _e('End-of-life dates and support status for every PHP version', 'phpinfo-wp'); ?></p>
22 </div>
23 </div>
24
25 <?php
26 $eol_cfg = [
27 'eol' => ['bg' => '#fff4f4', 'border' => '#d63638', 'badge_bg' => '#d63638', 'label' => __('END OF LIFE', 'phpinfo-wp')],
28 'warning' => ['bg' => '#fffbf0', 'border' => '#dba617', 'badge_bg' => '#dba617', 'label' => __('EXPIRING SOON', 'phpinfo-wp')],
29 'ok' => ['bg' => '#f0faf2', 'border' => '#00a32a', 'badge_bg' => '#00a32a', 'label' => __('SUPPORTED', 'phpinfo-wp')],
30 'unknown' => ['bg' => '#f6f7f7', 'border' => '#888', 'badge_bg' => '#888', 'label' => __('UNKNOWN', 'phpinfo-wp')],
31 ];
32 $cfg = $eol_cfg[$current['status']] ?? $eol_cfg['unknown'];
33 ?>
34
35 <!-- Current version hero card -->
36 <div style="background:<?php echo $cfg['bg']; ?>;border:1px solid <?php echo $cfg['border']; ?>;border-left:5px solid <?php echo $cfg['border']; ?>;border-radius:8px;padding:24px 28px;display:flex;align-items:center;gap:28px;flex-wrap:wrap;margin-bottom:32px">
37 <div style="text-align:center;flex-shrink:0">
38 <div style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#888;margin-bottom:4px"><?php _e('Running on', 'phpinfo-wp'); ?></div>
39 <div style="font-size:42px;font-weight:800;line-height:1;color:#1d2327"><?php printf( __('PHP %s', 'phpinfo-wp'), esc_html($current['minor']) ); ?></div>
40 <div style="font-size:12px;color:#666;margin-top:4px"><?php echo esc_html(PHP_VERSION); ?></div>
41 </div>
42 <div style="flex:1;min-width:220px">
43 <span style="display:inline-block;padding:3px 10px;border-radius:4px;font-size:11px;font-weight:700;letter-spacing:.5px;background:<?php echo $cfg['badge_bg']; ?>;color:#fff;margin-bottom:10px">
44 <?php echo esc_html($cfg['label']); ?>
45 </span>
46 <?php if ($current['status'] === 'eol'): ?>
47 <p style="margin:0;font-size:14px"><?php printf( __('Reached end-of-life on <strong>%s</strong>. No security patches are being issued. Contact your host and request a PHP upgrade to 8.2 or newer immediately.', 'phpinfo-wp'), esc_html($current['eol']) ); ?></p>
48 <?php elseif ($current['status'] === 'warning'): ?>
49 <p style="margin:0;font-size:14px"><?php printf( __('Reaches end-of-life on <strong>%1$s</strong> — <strong>%2$s days</strong> from now. Plan your PHP upgrade before that date.', 'phpinfo-wp'), esc_html($current['eol']), esc_html($current['days']) ); ?></p>
50 <?php elseif ($current['status'] === 'ok'): ?>
51 <p style="margin:0;font-size:14px"><?php printf( __('Actively supported until <strong>%1$s</strong> — <strong>%2$s days</strong> from now. You\'re good.', 'phpinfo-wp'), esc_html($current['eol']), esc_html($current['days']) ); ?></p>
52 <?php else: ?>
53 <p style="margin:0;font-size:14px"><?php printf( __('EOL date not found for PHP %s. Check <a href="https://www.php.net/supported-versions.php" target="_blank">php.net/supported-versions</a>.', 'phpinfo-wp'), esc_html($current['minor']) ); ?></p>
54 <?php endif; ?>
55 </div>
56 </div>
57
58 <!-- Version timeline -->
59 <h2 class="phpinfowp-section-heading"><?php _e('Version Lifecycle', 'phpinfo-wp'); ?></h2>
60 <table class="wp-list-table widefat fixed striped phpinfowp-eol-table">
61 <thead>
62 <tr>
63 <th style="width:140px"><?php _e('Version', 'phpinfo-wp'); ?></th>
64 <th style="width:130px"><?php _e('EOL Date', 'phpinfo-wp'); ?></th>
65 <th style="width:150px"><?php _e('Status', 'phpinfo-wp'); ?></th>
66 <th><?php _e('Days', 'phpinfo-wp'); ?></th>
67 </tr>
68 </thead>
69 <tbody>
70 <?php foreach (array_reverse($timeline) as $row): ?>
71 <tr <?php if ($row['current']) echo 'style="background:#f3f0ff;font-weight:600"'; ?>>
72 <td>
73 <?php printf( __('PHP %s', 'phpinfo-wp'), esc_html($row['version']) ); ?>
74 <?php if ($row['current']): ?>
75 <span style="font-size:10px;font-weight:700;padding:1px 5px;border-radius:3px;background:#777BB3;color:#fff;margin-left:4px"><?php _e('YOU', 'phpinfo-wp'); ?></span>
76 <?php endif; ?>
77 </td>
78 <td><?php echo esc_html($row['eol']); ?></td>
79 <td>
80 <span class="eol-badge eol-badge-<?php echo esc_attr($row['status']); ?>">
81 <?php echo esc_html($status_labels[$row['status']]['label']); ?>
82 </span>
83 </td>
84 <td style="color:<?php echo $row['days'] < 0 ? '#d63638' : ($row['days'] < 90 ? '#dba617' : '#555'); ?>">
85 <?php if ($row['days'] < 0): ?>
86 <?php printf( _n('%s day ago', '%s days ago', abs($row['days']), 'phpinfo-wp'), esc_html(abs($row['days'])) ); ?>
87 <?php else: ?>
88 <?php printf( _n('%s day', '%s days', $row['days'], 'phpinfo-wp'), esc_html($row['days']) ); ?>
89 <?php endif; ?>
90 </td>
91 </tr>
92 <?php endforeach; ?>
93 </tbody>
94 </table>
95 <p class="description" style="margin-top:10px">
96 <?php printf(
97 __('Source: %s — updated in each plugin release.', 'phpinfo-wp'),
98 '<a href="https://www.php.net/supported-versions.php" target="_blank">php.net/supported-versions</a>'
99 ); ?>
100 </p>
101
102 <?php if (!$is_pro && in_array($current['status'], ['warning', 'eol'], true)): ?>
103 <div class="phpinfowp-eol-upsell">
104 <div class="phpinfowp-eol-upsell-icon">
105 <span class="dashicons dashicons-warning"></span>
106 </div>
107 <div class="phpinfowp-eol-upsell-body">
108 <h3><?php printf( __('Plan your PHP %s upgrade with confidence', 'phpinfo-wp'), esc_html($current['minor']) ); ?></h3>
109 <p>
110 <?php _e('Before you upgrade, scan every plugin and theme for compatibility with your target PHP version. Save snapshots, monitor changes, and email yourself a digest.', 'phpinfo-wp'); ?>
111 </p>
112 <ul class="phpinfowp-eol-upsell-list">
113 <li><strong><?php _e('PHP Compatibility Scanner', 'phpinfo-wp'); ?></strong> <?php _e('find breaking changes across all plugins/themes', 'phpinfo-wp'); ?></li>
114 <li><strong><?php _e('Config Snapshots', 'phpinfo-wp'); ?></strong> <?php _e('diff php.ini before and after the upgrade', 'phpinfo-wp'); ?></li>
115 <li><strong><?php _e('Audit Report', 'phpinfo-wp'); ?></strong> <?php _e('single-page PDF for clients or your records', 'phpinfo-wp'); ?></li>
116 <li><strong><?php _e('Email Alerts', 'phpinfo-wp'); ?></strong> <?php _e('get warned 90/30/7 days before any PHP EOL', 'phpinfo-wp'); ?></li>
117 </ul>
118 <a href="https://exeebit.com/phpinfo-wp#pricing" target="_blank" class="phpinfowp-upgrade-cta">
119 <?php _e('Upgrade safely — Get Pro &rarr;', 'phpinfo-wp'); ?>
120 </a>
121 </div>
122 </div>
123 <?php endif; ?>
124
125 </div>