getMessage(); } } return $ace; } global $ace; $ace = ace(); // Version Check /** * Check that we can use PHP 5.4 and fail if not * * @param string $old_name * @param object $old_theme */ function ace_version_check( $old_name, $old_theme ) { if ( version_compare( phpversion(), '5.4.0', '<' ) ) { function shapeshifer_version_check_notices() { echo '
'; printf( __( 'This theme requires PHP version 5.4.0. You are currently using %s.', 'ace' ), PHP_VERSION ); echo '
'; } add_action( 'admin_notices', 'shapeshifer_version_check_notices' ); switch_theme( $old_theme->stylesheet ); } } add_action( 'after_switch_theme', 'ace_version_check', 10, 2 );