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
var $popovers = $(Settings.popovers); | |
function loadPopoverContent( $self, $target ) { | |
var $clone = $target.clone(1).css('display', 'block'); | |
var href = $self.attr('href'); | |
if( href.length > 1 ) { | |
$target.remove(); | |
$.ajax({ |
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( is_singular( array('product') ) ) { | |
add_filter( 'wpseo_title', function($old) { | |
$price = get_post_meta( get_the_ID(), '_regular_price', true); | |
return $price; | |
}, 100 ); | |
add_filter( 'wpseo_metadesc', function($old) { |
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(document).ready(function($) { | |
/** @let Is map already enabled */ | |
var mapEnabled; | |
/** @let append in this wrepper || watch then scroll on viewport */ | |
var $mapWrapper = $('.footer-contacts__map'); | |
/** @const wrapper top position from start page */ | |
var mapWrapperTop = $mapWrapper.offset().top; | |
$(window).on('scroll', function(event) { | |
if(mapEnabled) return; |
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 | |
/** | |
* Register //example.com/myurl/ query | |
*/ | |
add_filter('query_vars', 'seo18_query_vars'); | |
function seo18_query_vars($query_vars) { | |
$query_vars[] = 'variable'; | |
return $query_vars; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Пример API Яндекс карт</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<!-- | |
Укажите свой API-ключ. Тестовый ключ НЕ БУДЕТ работать на других сайтах. | |
Получить ключ можно в Кабинете разработчика: https://developer.tech.yandex.ru/keys/ | |
--> |
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 | |
/** | |
* Custom Loop Add to Cart. | |
* | |
* Template with quantity and ajax. | |
* @since Woocommerce 3.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. |
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
<!-- BEGIN JIVOSITE CODE {literal} --> | |
<script type='text/javascript'> | |
(function(){ | |
var widget_id = '#YOUR_API_KEY#'; | |
document.jivositeloaded = 0; | |
var d = document; | |
var w = window; | |
function load() { | |
// Insert script tag before another first script |
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 ( ! defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); | |
/** | |
* @link https://ydmitry.ru/blog/fayl-nastroyki-parametrov-komponenta-bitrix-parameters-php/ | |
* @var $arCurrentValues Установленные параметры (к пр. $arCurrentValues["STRING"]) | |
*/ | |
$arComponentParameters = array( | |
/** | |
* Built in groups: |
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
"код параметра" => array( | |
"PARENT" => "код группы", // если пустое - ставится ADDITIONAL_SETTINGS | |
"NAME" => " название параметра на текущем языке", //рекомендуется подключение из lang файлов с помощью GetMessage(), | |
"TYPE" => "тип элемента управления, в котором будет устанавливаться параметр", | |
"REFRESH" => "перегружать настройки или нет после выбора (N/Y)", | |
"MULTIPLE" => "одиночное/множественное значение (N/Y)", | |
"VALUES" => "массив значений для списка ('TYPE' = 'LIST')", | |
"ADDITIONAL_VALUES" => "показывать поле для значений, вводимых вручную (Y/N)", | |
"SIZE" => "число строк для списка (если нужен не выпадающий список)", | |
"DEFAULT" => "значение по умолчанию", |
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
$.magnifier = function (target, options) { | |
if (!target || !$(target).length) return false; | |
options = options || {}; | |
var nativeWidth = 0; | |
var nativeHeight = 0; | |
var mouse = {x: 0, y: 0}; | |
var $curImg; | |
var ui = { |