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 new_excerpt_length($length) { | |
return 25; | |
} | |
add_filter('excerpt_length', 'new_excerpt_length'); | |
add_filter('excerpt_more', function($more) { | |
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
var linkNav = document.querySelectorAll('[href^="#"]'), //выбираем все ссылки к якорю на странице | |
V = 1 // скорость, может иметь дробное значение через точку (чем меньше значение - тем больше скорость) | |
for (var i = 0; i < linkNav.length; i++) { | |
linkNav[i].addEventListener('click', function (e) { //по клику на ссылку | |
e.preventDefault() //отменяем стандартное поведение | |
var w = window.pageYOffset, // производим прокрутка прокрутка | |
hash = this.href.replace(/[^#]*(.*)/, '$1') // к id элемента, к которому нужно перейти | |
t = document.querySelector(hash).getBoundingClientRect().top, // отступ от окна браузера до id | |
start = null | |
requestAnimationFrame(step) // подробнее про функцию анимации [developer.mozilla.org] |
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 me_ipapus_scripts() { | |
wp_enqueue_style( 'me-ipapus-style', get_stylesheet_uri(), array(), filemtime( get_theme_file_path() . '/style.css' ) ); | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'me-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), filemtime( get_theme_file_path() . '/js/bootstrap.min.js' ), true ); | |
wp_enqueue_script( 'me-functions', get_template_directory_uri() . '/js/functions.js', array('jquery'), filemtime( get_theme_file_path() . '/js/functions.js' ), true ); |
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 roundTo(num) { | |
return Math.round(num/10)*10; | |
} |
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-group input-group"> | |
<div class="input-group-prepend"> | |
<button class="btn btn-secondary js-num" type="button" data-type="minus" data-field="input-one">−</button> | |
</div> | |
<input type="text" min="0" max="100" step="5" value="1" id="input-one" class="form-control"> | |
<div class="input-group-append"> | |
<button class="btn btn-secondary js-num" type="button" data-type="plus" data-field="input-one">+</button> | |
</div> | |
</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
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
if ( '376' == event.detail.contactFormId ) { | |
$('#contact-modal .form').slideUp(function() { | |
$('#contact-modal .result').slideDown(); | |
}); | |
console.log("FORMSENT"); | |
yaCounter51427798.reachGoal('FORMSENT'); | |
}; |
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
#s8343 { // Карта и контактная инфомрация | |
height: 550px; | |
padding: 0; | |
#map { | |
position:absolute; | |
width:100%; | |
height:550px; | |
} | |
} |
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 mero_myme_types($mime_types){ | |
$mime_types['svg'] = 'image/svg+xml'; | |
return $mime_types; | |
} | |
add_filter('upload_mimes', 'mero_myme_types', 1, 1); | |
# Исправление MIME типа для SVG файлов. | |
function fix_svg_mime_type( $data, $file, $filename, $mimes, $real_mime = '' ){ |
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
[class^="icon-"]{ | |
display: inline-block; | |
background: url('../img/icons/icons.png') no-repeat; | |
width: 64px; | |
height: 51px; | |
overflow: hidden; | |
zoom:0.5; | |
-moz-transform:scale(0.5); | |
-moz-transform-origin: 0 0; | |
} |
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_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); | |
function enqueue_parent_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); | |
} | |
?> |
OlderNewer