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 price = Math.floor(price) + ''; | |
price = price.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 '); | |
function sep(n){return n.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g,'$1 ');} | |
function rmm(min,max){return Math.floor(Math.random()*(max-min+1))+min;} |
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
<iframe src="https://www.youtube.com/embed/XXX?enablejsapi=1" frameborder="0" allowfullscreen></iframe> | |
<iframe src="https://www.youtube.com/embed/fjjkcWP4heM?rel=0&controls=0&showinfo=0&start=5&enablejsapi=1" frameborder="0" allowfullscreen></iframe> | |
<iframe src="https://www.youtube-nocookie.com/embed/knfrxj0T5NY" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
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
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://olddomain.ru', 'http://newdomain.ru') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = REPLACE(guid, 'http://olddomain.ru','http://newdomain.ru'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://olddomain.ru', 'http://newdomain.ru'); | |
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://test.truemisha.ru','https://misha.blog'); |
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
$expectMarks = array('utm_source','utm_medium','utm_campaign','utm_term','utm_content');$utms = array();foreach($expectMarks as $utm){if(isset($_REQUEST[$utm])){ setcookie($utm,$_REQUEST[$utm],time()+60*60*24*365,"/");}} |
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
// page tags | |
<?php get_header(); ?> | |
<?php get_footer(); ?> | |
<?php bloginfo('template_url'); ?>/ | |
<?php /* Template Name: Index */ ?> | |
<?php get_template_part('partname'); ?> | |
<?php get_template_part('template-parts/content-post', get_post_type()); ?> | |
<?php wp_head(); ?> | |
<?php wp_footer(); ?> |
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
// js-acc | |
var accItems = $('.js-acc > .item'); | |
var accTitles = $('.js-acc > .item > .title'); | |
accItems.removeClass('open').find('.desc').slideUp(); | |
accItems.eq(0).addClass('open').find('.desc').slideDown(); | |
accTitles.on('click', function() { | |
var parent = $(this).parent('.item'); | |
if (parent.hasClass('open')) { | |
parent.removeClass('open').find('.desc').slideUp(); | |
} else { |
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
<script>setTimeout(function(){history.back(1);},5000);</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
<div class="input input-number"> | |
<button class="minus">‐</button> | |
<input type="number" name="" id="" class="" value="1"> | |
<button class="plus">+</button> | |
</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
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script> | |
<a class="mapFly" data-flyx="59.9178326" data-flyy="30.3937128">Санкт-петербург</a> | |
<a class="mapFly" data-flyx="55.755826" data-flyy="37.6173">Москва</a> | |
<script type="text/javascript"> | |
ymaps.ready(init); | |
function init() { |
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 cmp($a, $b) { return strcmp($a["cat_letter"], $b["cat_letter"]); } | |
usort($infoCats, "cmp"); | |
?> |
NewerOlder