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
/*Вызывается, как и любой jquery плагин: | |
$(function() { $('.article-text').hyphenate(); }) | |
http://vyachet.ru/blog/2014/08/14/hyphen-russian-html-text/ -ссылка на оригинал статьи | |
http://jsfiddle.net/swed/94crypw7/ -демонстрация работы плагина*/ | |
$.fn.hyphenate = function() { | |
var all = "[абвгдеёжзийклмнопрстуфхцчшщъыьэюя]", | |
glas = "[аеёиоуыэю\я]", |
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 | |
/****** | |
Parallelize downloads across hostnames for WordPress. | |
Useful to boost static resources load speed on websites. | |
Recommended by GTmetrix, Pingdom, Google Speed Insights, and others. | |
See full post > https://medium.com/p/32e9dc2fec0c | |
In order to work properly, all subdomains/hostnames MUST have the same structure/path. Ex: | |
http://mydomain.com/wp-content/uploads/2015/11/myimage.jpg |
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 | |
function ClearLocalCacheButton() { ?> | |
// Create Button | |
<a href="#" onclick="ClearLocalCache()" class="et-pb-layout-buttons et-pb-layout-buttons-cache" title="Clear Cache"> | |
<span>Clear Cache</span> | |
</a> | |
<script type="text/javascript"> | |
// Move Button to Divi Tabs | |
jQuery(window).load(function(){ |
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 opener if adding to functions.php | |
if ( ! function_exists( 'et_load_core_options' ) ) { | |
function et_load_core_options() { | |
global $shortname, $themename; | |
require_once get_template_directory() . esc_attr( "/options_{$shortname}.php" ); | |
$newOptions = []; | |
foreach ($options as $i => $optionArray) { |
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 | |
function limit_wc_stock() { | |
global $product; | |
if ( $product->stock ) { | |
if ( number_format($product->stock,0,'','') < 100 ) { // If stock is less than 100 | |
/* Limit Quantity */ | |
function limit_wc_stock_quantity_args( $args, $product ) { | |
$args['max_value'] = 10; // Max value | |
return $args; | |
} |
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 | |
if ( !function_exists( 'fb_browser_warning' ) ) { | |
function fb_browser_warning() { | |
?> | |
<style> | |
.fb_browser_warning { | |
position: relative; | |
background: #3B5998; | |
padding: 20px 20px 20px 80px; |
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 | |
// copy function into functions.php | |
function dpb_all_post_types( $post_types ) { | |
$args = array( | |
'public' => true, | |
'_builtin' => 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
(function($) { | |
$.fn.myParallax = function(){ | |
return this.each(function() { | |
var ths = $(this); | |
ths | |
.css({ | |
"min-height" : "400px", |
OlderNewer