mirror of
https://github.com/woocommerce/storefront.git
synced 2025-08-20 04:00:29 +08:00
Fix spacing and only enqueue if handheld nav is being used
This commit is contained in:
parent
f943637bae
commit
14fb73f1ed
1 changed files with 6 additions and 7 deletions
|
@ -250,16 +250,15 @@ if ( ! class_exists( 'Storefront' ) ) :
|
|||
wp_enqueue_script( 'storefront-navigation', get_template_directory_uri() . '/assets/js/navigation' . $suffix . '.js', array(), $storefront_version, true );
|
||||
wp_enqueue_script( 'storefront-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix' . $suffix . '.js', array(), '20130115', true );
|
||||
|
||||
$storefront_l10n = array();
|
||||
|
||||
if ( has_nav_menu( 'handheld' ) ) {
|
||||
$storefront_l10n['expand'] = __( 'Expand child menu', 'storefront' );
|
||||
$storefront_l10n['collapse'] = __( 'Collapse child menu', 'storefront' );
|
||||
$storefront_l10n = array(
|
||||
'expand' => __( 'Expand child menu', 'storefront' ),
|
||||
'collapse' => __( 'Collapse child menu', 'storefront' ),
|
||||
);
|
||||
|
||||
wp_localize_script( 'storefront-navigation', 'storefrontScreenReaderText', $storefront_l10n );
|
||||
}
|
||||
|
||||
wp_localize_script( 'storefront-navigation', 'storefrontScreenReaderText', $storefront_l10n );
|
||||
|
||||
|
||||
if ( is_page_template( 'template-homepage.php' ) && has_post_thumbnail() ) {
|
||||
wp_enqueue_script( 'storefront-rgbaster', get_template_directory_uri() . '/assets/js/vendor/rgbaster.min.js', array(), '1.1.0', true );
|
||||
wp_enqueue_script( 'storefront-homepage', get_template_directory_uri() . '/assets/js/homepage' . $suffix . '.js', array(), $storefront_version, true );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue