';
if ( ! current_user_can( 'update_plugins' ) ) {
/* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
@@ -430,24 +433,40 @@ function wp_plugin_update_row( $file, $plugin_data ) {
$response->new_version
);
} else {
- /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
- printf(
- __( 'There is a new version of %1$s available. View version %4$s details or update now.' ),
- $plugin_name,
- esc_url( $details_url ),
- sprintf(
- 'class="thickbox open-plugin-details-modal" aria-label="%s"',
- /* translators: 1: plugin name, 2: version number */
- esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
- ),
- $response->new_version,
- wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
- sprintf(
- 'class="update-link" aria-label="%s"',
- /* translators: %s: plugin name */
- esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
- )
- );
+ if ( $compatible_php ) {
+ /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
+ printf(
+ __( 'There is a new version of %1$s available. View version %4$s details or update now.' ),
+ $plugin_name,
+ esc_url( $details_url ),
+ sprintf(
+ 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+ /* translators: 1: plugin name, 2: version number */
+ esc_attr( sprintf ( __('View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
+ ),
+ $response->new_version,
+ wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ),
+ sprintf(
+ 'class="update-link" aria-label="%s"',
+ /* translators: %s: plugin name */
+ esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
+ )
+ );
+ } else {
+ /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Updating PHP page URL */
+ printf(
+ __( 'There is a new version of %1$s available, but it doesn’t work with your version of PHP. View version %4$s details or learn more about updating PHP.' ),
+ $plugin_name,
+ esc_url( $details_url ),
+ sprintf(
+ 'class="thickbox open-plugin-details-modal" aria-label="%s"',
+ /* translators: 1: plugin name, 2: version number */
+ esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_name, $response->new_version ) )
+ ),
+ $response->new_version,
+ esc_url( __('https://wordpress.org/support/upgrade-php/' ) )
+ );
+ }
}
/**