This file contains hidden or 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 | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define('WP_HOME',''); | |
define('WP_SITEURL',''); | |
define('FORCE_SSL_LOGIN', true); |
This file contains hidden or 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
// ======= Fixed block ======= | |
(function($) { | |
$.fn.addFixClass = function(options) { | |
options = $.extend({ | |
offset: 200, | |
destroy: false | |
}, options); | |
var fixClass = $(this); | |
$(window).bind('scroll', function() { | |
if ($(window).scrollTop() >= options.offset && !options.destroy) { |
This file contains hidden or 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 | |
$args = array( | |
'posts_per_page' => 15, | |
'cat' => 12 | |
); | |
$postsArr = get_posts( $args ); | |
$chunkPosts = array_chunk($postsArr ,9); | |
foreach($chunkPosts as $posts){ | |
echo '<div class="klients-logos__item">'; |
This file contains hidden or 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
// ================ Wrap img in content HTML5 tags ================ | |
var imgContent = $('.page__body.textblock a.popup-video img'); | |
imgContent.each(function() { | |
$this = $(this); | |
var imgTitle = $this.attr('title'); | |
if (imgTitle) { | |
$this.parent('.popup-video').wrap('<figure class="content-image"></figure>'); | |
$this.parent('.popup-video').append('<figcaption class="content-image__title">' + imgTitle + '</figcaption>'); | |
} | |
}); |
This file contains hidden or 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
/** ------------------------------------------------------------ | |
==================== RESPONSIVE ======================== | |
------------------------------------------------------------------------------ **/ | |
/** ----------------------------------------- | |
========= MIN-WIDTH ========== | |
-------------------------------------------- **/ | |
@media (min-width: 1201px) {} | |
@media (min-width: 992px) {} |
This file contains hidden or 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 | |
$text = $this->item->text; | |
$patern="#<[\s]*p[\s]*>([^<]*)<[\s]*/p[\s]*>#i"; | |
if(preg_match($patern, $text, $matches)) echo "<p>".$matches[1]."</p>"; | |
?> |
This file contains hidden or 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 | |
// GET CUSTOM FIELDS | |
$myCustomFields = array(); | |
foreach($this->item->jcfields as $field) { | |
$myCustomFields[$field->name] = $field->value; | |
} | |
// RECOVER CUSTOM FILED NAME | |
if (isset($myCustomFields['url']) and !empty($myCustomFields['url'])) : ?> | |
<div class="field"> | |
<?php echo $myCustomFields['url']; ?> |
This file contains hidden or 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 addContent($addTo, $add, $cntRep, $after = '</p>', $openTag = '<div align="center">', $closeTag = '</div>'){ | |
$posAfter = 0; | |
for ($i=0; $i < $cntRep; $i++) { | |
$pos = stripos($addTo, $after, $posAfter); | |
$posAfter = $pos+strlen($after); | |
if($pos===FALSE){ | |
return $addTo; | |
} |
This file contains hidden or 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
/** ===== Humburger ===== **/ | |
.hamburger { | |
display: block; | |
text-decoration: none; | |
position: relative; | |
outline: none; | |
transition: transform .3s ease; | |
height: 20px; | |
width: 30px; | |
z-index: 10; |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Простая форма связи на ajax</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
// ======= Ajax Submit Form Plugin ======= | |
(function($) { |
NewerOlder