This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grecaptcha-badge { | |
border: 0; | |
clip: rect(1px, 1px, 1px, 1px); | |
-webkit-clip-path: inset(50%); | |
clip-path: inset(50%); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://andreas-hecht.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function shop_loop_sizes_news() { | |
$product = wc_get_product(); | |
$attributes = array(); | |
$variation_id = ''; | |
if ( 'simple' === $product->get_type() ) { | |
$attributes = get_the_terms( $product->get_id(), 'pa_size' ); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('click', '.js-preview-add-to-cart', function (event) { | |
var $thisbutton = $(this); | |
var product_id = $(this).attr('data-product-id'); | |
if (variation_id != 0 && typeof variation_id !== 'undefined') { | |
variation_id = variation_id; | |
} else { | |
variation_id = product_id; | |
} | |
// console.log(variation_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_shortcode( 'art_one_new_post', 'one_new_post_function' ); | |
function one_new_post_function ($atts){ | |
$atts = shortcode_atts( | |
array( | |
'id' => '', | |
'count' => 1, | |
), | |
$atts | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_single_product_summary', 'artabr_link_to_current_category', 35 ); | |
function artabr_link_to_current_category() { | |
$product = wc_get_product(); | |
$terms = get_the_terms( $product->ID, 'product_cat' ); | |
if ( $terms ) { | |
$term = array_shift( $terms ); | |
?> | |
<a href="<?php echo esc_url( get_term_link( $term->term_id ) ); ?>">Назад</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tree-col{ | |
display: flex; | |
-webkit-flex-flow: column wrap; | |
-moz-flex-flow: column wrap; | |
-ms-flex-flow: column wrap; | |
flex-flow: column wrap; | |
} | |
.product div.summary { | |
width: calc(100% - 400px - 400px - 50px) !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_shortcode('wp_caption', 'wpruse_custom_img_caption_shortcode'); | |
add_shortcode('caption', 'wpruse_custom_img_caption_shortcode'); | |
function wpruse_custom_img_caption_shortcode( $attr, $content = null ) { | |
// New-style shortcode with the caption inside the shortcode with the link and image tags. | |
if ( ! isset( $attr['caption'] ) ) { | |
if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) { | |
$content = $matches[1]; | |
$attr['caption'] = trim( $matches[2] ); | |
} | |
} elseif ( strpos( $attr['caption'], '<' ) !== false ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ========================================================================== | |
Slider Images | |
========================================================================== */ | |
.repeat_block .dashicons.dashicons-no-alt:hover{ | |
color: red; | |
} | |
.repeatable { | |
margin-bottom: 7px; | |
counter-reset: items; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get form AnyComment | |
*/ | |
function woo_anycomment() { | |
echo do_shortcode( '[anycomment include="true"]' ); | |
} | |
/** | |
* Get tabs reviews to AnyComment | |
* |