From f395d0bd96baaf0b5ff4950608a56b9cc9ddf937 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Tue, 11 Nov 2014 13:16:11 -0500 Subject: [PATCH] deactivation error effficiency --- .../class-displayfeaturedimagegenesis.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/includes/class-displayfeaturedimagegenesis.php b/includes/class-displayfeaturedimagegenesis.php index c7b2b99..12ca94a 100644 --- a/includes/class-displayfeaturedimagegenesis.php +++ b/includes/class-displayfeaturedimagegenesis.php @@ -57,20 +57,23 @@ class Display_Featured_Image_Genesis { * @since 1.1.0 */ public function error_message() { - if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) { - echo '

' . sprintf( - __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated.', 'display-featured-image-genesis' ) ) . '

'; - } - else { - echo '

' . sprintf( - __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated. But since we're talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you.', 'display-featured-image-genesis' ), + + $error = sprintf( + __( 'Sorry, Display Featured Image for Genesis works only with the Genesis Framework. It has been deactivated.', 'display-featured-image-genesis' ) ); + + if ( version_compare( PHP_VERSION, '5.3', '<' ) ) { + $error = $error . sprintf( + __( ' But since we\'re talking anyway, did you know that your server is running PHP version %1$s, which is outdated? You should ask your host to update that for you.', 'display-featured-image-genesis' ), PHP_VERSION - ) . '

'; + ); } + echo '

' . $error . '

'; + if ( isset( $_GET['activate'] ) ) { unset( $_GET['activate'] ); } + }