Improved the WC_Tracker::get_theme_info() version compare

This commit is contained in:
Claudio Sanches 2015-01-23 14:29:10 -02:00
parent b1c5e19d56
commit 71558c449f
1 changed files with 4 additions and 2 deletions

View File

@ -140,7 +140,9 @@ class WC_Tracker {
* @return array
*/
public function get_theme_info() {
if ( get_bloginfo( 'version' ) < '3.4' ) {
$wp_version = get_bloginfo( 'version' );
if ( version_compare( $wp_version, '3.4', '<' ) ) {
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
$theme_name = $theme_data['Name'];
$theme_version = $theme_data['Version'];
@ -436,4 +438,4 @@ class WC_Tracker {
endif;
return new WC_Tracker;
return new WC_Tracker;