Default themes get theme support

This commit is contained in:
Mike Jolley 2017-01-27 15:35:06 +00:00
parent 24608370ab
commit 46367710ee
1 changed files with 14 additions and 0 deletions

View File

@ -43,6 +43,20 @@ class WC_Frontend_Scripts {
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'load_scripts' ) );
add_action( 'wp_print_scripts', array( __CLASS__, 'localize_printed_scripts' ), 5 );
add_action( 'wp_print_footer_scripts', array( __CLASS__, 'localize_printed_scripts' ), 5 );
add_action( 'setup_theme', array( __CLASS__, 'add_default_theme_support' ) );
}
/**
* Add theme support for default WP themes.
*
* @since 2.7.0
*/
public static function add_default_theme_support() {
if ( in_array( get_option( 'template' ), wc_get_core_supported_themes() ) ) {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
}
/**