Skip to content

Commit 271e75c

Browse files
committed
update message for plugin recommandation
1 parent 69ec90c commit 271e75c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/Admin/SiteHealth.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,29 +163,33 @@ public function persistent_object_cache() {
163163
$available_cache = $this->check_available_cache();
164164

165165
/* translators: plugin recommendation markup */
166-
$plugin_placeholder = _x( 'We recommend to use %s plugin.', 'plugin recommendation markup', 'amp' );
166+
$plugin_placeholder = _x(
167+
'Please find out available plugin from %s directory. <a href="https://amp-wp.org/documentation/getting-started/amp-site-setup/persistent-object-caching/#i-need-help-setting-up-my-persistent-object-cache">Learn more.</a>',
168+
'plugin recommendation markup',
169+
'amp'
170+
);
167171

168172
if ( true === $available_cache['redis'] ) {
169173

170174
$plugin_recommendation = sprintf(
171175
$plugin_placeholder,
172-
'<a href="https://wordpress.org/plugins/redis-cache/" target="_blank">Redis Object Cache</a>'
176+
'<a href="https://wordpress.org/plugins/search/redis+object+cache/" target="_blank">wordpress.org</a>'
173177
);
174178

175179
$description .= '<p>' . __( 'During the test, We found that the site has Redis cache is available.', 'amp' ) . '&nbsp;' . $plugin_recommendation . '</p>';
176180
} elseif ( true === $available_cache['memcached'] ) {
177181

178182
$plugin_recommendation = sprintf(
179183
$plugin_placeholder,
180-
'<a href="https://wordpress.org/plugins/w3-total-cache/" target="_blank">W3 Total Cache</a>'
184+
'<a href="https://wordpress.org/plugins/search/memcached+object+cache/" target="_blank">wordpress.org</a>'
181185
);
182186

183187
$description .= '<p>' . __( 'During the test, We found that the site has Memcache cache is available.', 'amp' ) . '&nbsp;' . $plugin_recommendation . '</p>';
184188
} elseif ( true === $available_cache['apcu'] ) {
185189

186190
$plugin_recommendation = sprintf(
187191
$plugin_placeholder,
188-
'<a href="https://wordpress.org/plugins/w3-total-cache/" target="_blank">W3 Total Cache</a>'
192+
'<a href="https://wordpress.org/plugins/search/apcu+object+cache/" target="_blank">wordpress.org</a>'
189193
);
190194

191195
$description .= '<p>' . __( 'During the test, We found that the site has Opcache cache is available.', 'amp' ) . '&nbsp;' . $plugin_recommendation . '</p>';
@@ -309,7 +313,11 @@ public function is_site_has_memcached() {
309313
*/
310314
public function is_site_has_apcu() {
311315

312-
return extension_loaded( 'apcu' );
316+
return (
317+
extension_loaded( 'apcu' ) ||
318+
function_exists( 'apc_store' ) ||
319+
function_exists( 'apcu_store' )
320+
);
313321
}
314322

315323
/**

0 commit comments

Comments
 (0)