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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L] |
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 | |
//Тип записи services | |
function true_post_type_rewrite() { | |
global $wp_rewrite; | |
// перезаписываем URL | |
// параметры add_rewrite_tag('%название_тега%', '%маска_символов%', '%url_параметр%') | |
$wp_rewrite -> add_rewrite_tag("%services%", '([^/]+)', "services="); |
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
/** | |
* Отключаем srcset и sizes для картинок в WordPress | |
*/ | |
// Отменяем srcset | |
// выходим на раннем этапе, этот фильтр лучше чем 'wp_calculate_image_srcset' | |
add_filter('wp_calculate_image_srcset_meta', '__return_null' ); | |
// Отменяем sizes - это поздний фильтр, но раннего как для srcset пока нет... | |
add_filter('wp_calculate_image_sizes', '__return_false', 99 ); |
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 | |
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
function custom_override_checkout_fields( $fields ) { | |
unset($fields['billing']['billing_company']); | |
return $fields; | |
} | |
?> |
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
/* sk_code | |
получаем код модуля с ИД 45 | |
*/ | |
$this->load->model('setting/module'); | |
$module_id = 45; | |
$sk_module_info = $this->model_setting_module->getModule($module_id); | |
if ($sk_module_info && $sk_module_info['status']) { | |
$data['sk_module'] = $this->load->controller('extension/module/html', $sk_module_info); |
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
HTML: | |
<div class="wrapper"> | |
<div class="tabs"> | |
<span class="tab">Вкладка 1</span> | |
<span class="tab">Вкладка 2</span> | |
<span class="tab">Вкладка 3</span> | |
</div> | |
<div class="tab_content"> | |
<div class="tab_item">Содержимое 1</div> | |
<div class="tab_item">Содержимое 2</div> |
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($){ | |
$(document).mouseup(function (e){ // событие клика по веб-документу (or .on(touchstart click)) | |
var div = $("#popup"); // тут указываем ID элемента | |
if (!div.is(e.target) // если клик был не по нашему блоку | |
&& div.has(e.target).length === 0) { // и не по его дочерним элементам | |
div.hide(); // скрываем его | |
} | |
}); | |
}); |
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
// Скролл к элементу | |
$(".menu").on("click","a.scroll", function (e) { | |
e.preventDefault(); | |
var id = $(this).attr('href'), | |
top = $(id).offset().top; | |
$('body,html').animate({scrollTop: top}, 600); | |
}); |
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
// скрытие placeholder | |
$('input, textarea').on('focus', function () { | |
var $this = $(this); | |
var placehold = $this.attr('placeholder'); | |
$this.attr('data-placeholder', placehold); | |
$this.attr('placeholder', ''); | |
// $this.data($this, 'placeholder', placehold); | |
}); | |
$('input, textarea').on('blur', function () { | |
var $this = $(this); |
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
{#ДЛЯ ПРИЛОЖЕНИЯ VIBER НА ПК#} | |
<li class="hidden-sm hidden-xs"><i class="fa fa-volume-control-phone" style="color: #800080"></i> <a href="viber://chat?number=+380674422838">Viber</a></li> | |
{#ДЛЯ ПРИЛОЖЕНИЯ VIBER НА МОБИЛЬНЫХ#} | |
<li class="hidden-lg hidden-md"><i class="fa fa-volume-control-phone" style="color: #800080"></i> <a href="viber://chat?add=380674422838">Viber</a></li> | |
<li class=""><i class="fa fa-telegram" style="color: #289FDB"></i> <a href="tg://resolve?domain=AndriyProstomebli">Telegram</a></li> |
OlderNewer