Extend theme info to include child theme and wc support.

This commit is contained in:
Gerhard 2014-11-27 09:07:31 +02:00
parent c4b4071649
commit 144c683d7b
1 changed files with 4 additions and 1 deletions

View File

@ -143,7 +143,10 @@ class WC_Tracker {
$theme_name = $theme_data->Name;
$theme_version = $theme_data->Version;
}
return array( 'name' => $theme_name, 'version' => $theme_version );
$theme_child_theme = is_child_theme() ? 'Yes' : 'No';
$theme_wc_support = ( ! current_theme_supports( 'woocommerce' ) && ! in_array( $active_theme->template, wc_get_core_supported_themes() ) ) ? 'No' : 'Yes';
return array( 'name' => $theme_name, 'version' => $theme_version, 'child_theme' => $theme_child_theme, 'wc_support' => $theme_wc_support );
}
/**