This file contains 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
$wp_customize->add_setting( 'themeslug_dropdownpages_setting_id', array( | |
'capability' => 'edit_theme_options', | |
'sanitize_callback' => 'themeslug_sanitize_dropdown_pages', | |
) ); | |
$wp_customize->add_control( 'themeslug_dropdownpages_setting_id', array( | |
'type' => 'dropdown-pages', | |
'section' => 'custom_section', // Add a default or your own section | |
'label' => __( 'Custom Dropdown Pages' ), | |
'description' => __( 'This is a custom dropdown pages option.' ), |
This file contains 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 woocommerce_product_category( $args = array() ) { | |
$woocommerce_category_id = get_queried_object_id(); | |
$args = array( | |
'parent' => $woocommerce_category_id | |
); | |
$terms = get_terms( 'product_cat', $args ); | |
if ( $terms ) { | |
echo '<ul class="woocommerce-categories">'; | |
foreach ( $terms as $term ) { | |
echo '<li class="woocommerce-product-category-page">'; |
This file contains 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
.helper-mob { | |
display: none; | |
-ms-flex-direction: row; | |
flex-direction: row; | |
position: fixed; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
width: 100%; | |
z-index: 10; |
This file contains 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
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
This file contains 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( 'wp_print_styles', 'dequeue_font_awesome_style' ); | |
function dequeue_font_awesome_style() { | |
wp_dequeue_style( 'elementor-icons' ); | |
wp_deregister_style( 'elementor-icons' ); | |
wp_dequeue_style( 'font-awesome' ); | |
wp_deregister_style( 'font-awesome' ); | |
wp_dequeue_style( 'fontawsome' ); | |
wp_deregister_style( 'fontawsome' ); |
This file contains 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
<?php | |
/** | |
* Функция склонения числительных в русском языке | |
* | |
* @param int $number Число которое нужно просклонять | |
* @param array $titles Массив слов для склонения | |
* @return string | |
**/ | |
$titles = array('котик', 'котика', 'котиков'); | |
function declOfNum($number, $titles) |
This file contains 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
<fieldset> | |
<legend>You can edit messages used in various situations here. For details, see <a href="https://contactform7.com/editing-messages/">Editing Messages</a>.</legend> | |
<p class="description"> | |
<label for="wpcf7-message-mail-sent-ok">Sender's message was sent successfully<br> | |
<input type="text" id="wpcf7-message-mail-sent-ok" name="wpcf7-messages[mail_sent_ok]" class="large-text" size="70" value="תודה לך על הודעתך, ההודעה נשלחה." data-config-field="messages.mail_sent_ok"> | |
</label> | |
</p> | |
<p class="description"> | |
<label for="wpcf7-message-mail-sent-ng">Sender's message failed to send<br> | |
<input type="text" id="wpcf7-message-mail-sent-ng" name="wpcf7-messages[mail_sent_ng]" class="large-text" size="70" value="בעת שליחת הודעתך אירע שגיאה, אנה נסה שנית מאוחר יותר." data-config-field="messages.mail_sent_ng"> |
This file contains 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
IE6 Only | |
================== | |
_selector {...} | |
IE6 & IE7 | |
================== | |
*html or { _property: } | |
IE7 Only | |
================== |
This file contains 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
const $menu = $('.dropdown'); | |
$(document).mouseup(function (e) { | |
if (!$menu.is(e.target) // if the target of the click isn't the container... | |
&& $menu.has(e.target).length === 0) // ... nor a descendant of the container | |
{ | |
$menu.removeClass('is-active'); | |
} | |
}); |