diff --git a/includes/admin/class-wc-admin-notices.php b/includes/admin/class-wc-admin-notices.php index 38286faeef5..333caf9a613 100644 --- a/includes/admin/class-wc-admin-notices.php +++ b/includes/admin/class-wc-admin-notices.php @@ -57,7 +57,7 @@ class WC_Admin_Notices { if ( in_array( 'theme_support', $notices ) && ! current_theme_supports( 'woocommerce' ) ) { $template = get_option( 'template' ); - if ( ! in_array( $template, array( 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ) ) ) { + if ( ! in_array( $template, wc_get_core_supported_themes() ) ) { wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', WC_PLUGIN_FILE ) ); add_action( 'admin_notices', array( $this, 'theme_check_notice' ) ); } diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index babab0e6755..0eda0bd44ab 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -382,15 +382,15 @@ - {'Author URI'} == 'http://www.woothemes.com' ) : + {'Author URI'} == 'http://www.woothemes.com' ) : $theme_dir = substr( strtolower( str_replace( ' ','', $active_theme->Name ) ), 0, 45 ); if ( false === ( $theme_version_data = get_transient( $theme_dir . '_version_data' ) ) ) : - $theme_changelog = wp_remote_get( 'http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $theme_dir . '/changelog.txt' ); + $theme_changelog = wp_remote_get( 'http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $theme_dir . '/changelog.txt' ); $cl_lines = explode( "\n", wp_remote_retrieve_body( $theme_changelog ) ); if ( ! empty( $cl_lines ) ) : @@ -414,27 +414,37 @@ endif; ?> - - : - + : + Name; - ?> - - - : - + + + : + Version; if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) echo ' – ' . $theme_version_data['version'] . ' ' . __( 'is available', 'woocommerce' ) . ''; - ?> - - - : - + + + : + {'Author URI'}; - ?> - + ?> + + + : + template, wc_get_core_supported_themes() ) ) { + echo '' . __( 'Not Declared', 'woocommerce' ) . ''; + } else { + echo '' . __( 'Yes', 'woocommerce' ) . ''; + } + ?> + diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php index ee298b43e30..b9efba20e87 100644 --- a/includes/wc-core-functions.php +++ b/includes/wc-core-functions.php @@ -602,3 +602,13 @@ function wc_remove_order_notes_from_wp_count_comments( $stats, $post_id ) { } add_filter( 'wp_count_comments', 'wc_remove_order_notes_from_wp_count_comments', 10, 2 ); + +/** + * WooCommerce Core Supported Themes + * + * @since 2.2 + * @return array + */ +function wc_get_core_supported_themes() { + return array( 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ); +}