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 () { | |
if($('html').scrollTop()>60){ | |
$('html').addClass('sticky'); | |
} else { | |
$('html').removeClass('sticky'); | |
} | |
}); |
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 | |
// This is the cleaner code per request of a thread in the LinkedIn group "WordPress" | |
// ... | |
// register and enqueue loadCSS | |
function load_scripts_and_styles() { | |
// register loadCSS | |
wp_register_script( 'load-css-async', get_stylesheet_directory_uri() . '/path/to/js/loadCSS.js', array(), '', false ); |
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 | |
// remove product description from single product pages | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); | |
add_filter( 'woocommerce_product_tabs', 'wc_remove_description_tab', 11, 1 ); | |
function wc_remove_description_tab( $tabs ) { | |
if ( isset( $tabs['description'] ) ) { | |
unset( $tabs['description'] ); | |
} | |
} | |
?> |
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
if(navigator.userAgent.indexOf("Chrome-Lighthouse") == -1) { | |
} | |
//GTmetrix and Pingdom | |
if(navigator.userAgent.match(/nux.*oto\sG|x11.*fox\/54|x11.*ome\/39|x11.*ome\/62|oid\s6.*1.*xus\s5.*MRA58N.*ome|JWR66Y.*ome\/62|woobot|speed|ighth|tmetr|eadle/i)){ | |
} |
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'); | |
} | |
}); |
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
<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
<?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
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' ); |
OlderNewer