← All changes
|
src/component/security-tweaks/class-php-version.php
+13
-8
5.8.1
→
6.3.0
View file →
| @@ -142,9 +142,9 @@ | ||
| 142 | 142 | * |
| 143 | 143 | * @return string |
| 144 | 144 | */ |
| 145 | 145 | public function get_label(): string { |
| 146 | - return esc_html__( 'Update PHP to latest version', 'defender-security' ); | |
| 146 | + return esc_html__( 'Update PHP', 'defender-security' ); | |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | 150 | * Get the error reason. |
| @@ -155,11 +155,11 @@ | ||
| 155 | 155 | $this->set_php_versions(); |
| 156 | 156 | |
| 157 | 157 | return sprintf( |
| 158 | 158 | /* translators: %s: Min PHP version. %s: Min PHP version. */ |
| 159 | - esc_html__( | |
| 159 | + wp_strip_all_tags( | |
| 160 | 160 | 'PHP versions older than %1$s are no longer supported. For security and stability we strongly recommend you upgrade your PHP version to version %2$s or newer as soon as possible.', |
| 161 | - 'defender-security' | |
| 161 | + 'wpdef' | |
| 162 | 162 | ), |
| 163 | 163 | $this->min_php, |
| 164 | 164 | $this->min_php |
| 165 | 165 | ); |
| @@ -173,16 +173,21 @@ | ||
| 173 | 173 | public function to_array(): array { |
| 174 | 174 | $this->set_php_versions(); |
| 175 | 175 | |
| 176 | 176 | return array( |
| 177 | - 'slug' => $this->slug, | |
| 178 | - 'title' => $this->get_label(), | |
| 179 | - 'errorReason' => $this->get_error_reason(), | |
| 180 | - 'successReason' => esc_html__( 'You have the latest version of PHP installed, good stuff!', 'defender-security' ), | |
| 181 | - 'misc' => array( | |
| 177 | + 'slug' => $this->slug, | |
| 178 | + 'title' => $this->get_label(), | |
| 179 | + 'errorReason' => $this->get_error_reason(), | |
| 180 | + 'successReason' => wp_strip_all_tags( __( 'You have the latest version of PHP installed, good stuff!', 'defender-security' ) ), | |
| 181 | + 'misc' => array( | |
| 182 | 182 | 'php_version' => $this->current_php, |
| 183 | 183 | 'min_php_version' => $this->min_php, |
| 184 | 184 | 'stable_php_version' => $this->stable_php, |
| 185 | + 'show_revert_button' => false, | |
| 186 | + 'show_action_button' => false, | |
| 187 | + ), | |
| 188 | + 'bulk_description' => array( | |
| 189 | + wp_strip_all_tags( __( 'PHP powers WordPress by processing code and generating your site’s pages. Update PHP to keep your site fast, reliable, secure, and compatible with supported versions.', 'defender-security' ) ), | |
| 185 | 190 | ), |
| 186 | 191 | ); |
| 187 | 192 | } |
| 188 | 193 | } |