Merge pull request #14937 from woocommerce/fix/gallery-noscript-and-alignment
Gallery fixes
This commit is contained in:
commit
e92b93f992
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -388,6 +388,10 @@ table.variations {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
li:nth-child(4n+1) {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
img {
|
||||
opacity: .5;
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -245,6 +245,10 @@ p.demo_store,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
li:nth-child(4n+1) {
|
||||
clear: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ function wc_get_product_attachment_props( $attachment_id = null, $product = fals
|
|||
$props['alt'] = trim( strip_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) );
|
||||
|
||||
// Large version.
|
||||
$src = wp_get_attachment_image_src( $attachment_id, 'large' );
|
||||
$src = wp_get_attachment_image_src( $attachment_id, 'full' );
|
||||
$props['full_src'] = $src[0];
|
||||
$props['full_src_w'] = $src[1];
|
||||
$props['full_src_h'] = $src[2];
|
||||
|
|
|
@ -106,6 +106,18 @@ function wc_prevent_adjacent_posts_rel_link_wp_head() {
|
|||
}
|
||||
add_action( 'template_redirect', 'wc_prevent_adjacent_posts_rel_link_wp_head' );
|
||||
|
||||
/**
|
||||
* Show the gallery if JS is disabled.
|
||||
*
|
||||
* @since 3.0.6
|
||||
*/
|
||||
function wc_gallery_noscript() {
|
||||
?>
|
||||
<noscript><style>.woocommerce-product-gallery{ opacity: 1 !important; }</style></noscript>
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'wc_gallery_noscript' );
|
||||
|
||||
/**
|
||||
* When the_post is called, put product data into a global.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue