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
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('div:not(.et_mobile_menu) .lightbox-content, div:not(.et_mobile_menu) [class*="lightbox-content-"]').addClass('mfp-hide'); | |
$('div:not(.et_mobile_menu) .lightbox-trigger').magnificPopup({ items: { src: 'div:not(.et_mobile_menu) .lightbox-content', type: 'inline' } }); | |
$('div:not(.et_mobile_menu) [class*="lightbox-trigger-"]').each(function(){ | |
var triggerClass = Array.prototype.find.call(this.classList, function(clazz){ | |
return clazz.indexOf('lightbox-trigger-') > -1; | |
}); | |
var suffix = triggerClass.split('lightbox-trigger-')[1]; | |
var content = '.lightbox-content-'+ suffix; |
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
<style id="divi-hack"> | |
/** @import Custom Fonts - Keep at top of this style **/ | |
@import url('https://fonts.googleapis.com/css?family=Indie+Flower'); | |
/** Body Overall Font Weight **/ | |
body { | |
font-weight: 800} | |
/** Menu Animation Accent Color **/ | |
.divi-hacks-animenu-1 #top-menu > li:before, | |
.divi-hacks-animenu-2 #top-menu li.current_page_item > a, | |
.divi-hacks-animenu-2 .et-fixed-header #top-menu li.current_page_item > a, |
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
/* | |
* Function for post duplication. Dups appear as drafts. User is redirected to the edit screen | |
*/ | |
function rd_duplicate_post_as_draft(){ | |
global $wpdb; | |
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) { | |
wp_die('No post to duplicate has been supplied!'); | |
} | |
/* |
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
//если шаблон 5 или 2 | |
[[*template:is=5:or:if=[[*template]]:is=2:then=` | |
//подключаем чанк с тайтлом | |
[[$seo.title.dis]] | |
//или шаблон 34 или 36 | |
:else= | |
[[*template:is=34:or:if=[[*template]]:is=36:then=` | |
//подключаем чанк seo.title.stroy | |
[[$seo.title.stroy]] | |
:else= |
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
$resources = $modx->getCollection('modResource',array('parent' => 19)); //берем ресурсы из категории "19" | |
foreach ($resources as $res) { | |
$res->set('template', 3); //устанавливаем им шаблон "3" | |
$res->save(); //сохраняем... | |
} |
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
Включение кеша браузера | |
===== | |
Вариант 1 | |
=== | |
<ifModule mod_headers.c> | |
<FilesMatch "\.(js|css|txt)$"> | |
Header set Cache-Control "max-age=604800" | |
</FilesMatch> | |
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$"> | |
Header set Cache-Control "max-age=2592000" |
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
jQuery(document).ready(function($) { | |
$(".post__body").magnificPopup({ | |
delegate: "p a[href$='.jpg'],p a[href$='.jpeg'],p a[href$='.gif'],p a[href$='.png']", | |
type: 'image', | |
closeOnContentClick: true, | |
mainClass: 'mfp-img-mobile', | |
image: { | |
verticalFit: 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
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('#modal1, #modal-1').magnificPopup({ | |
type: 'inline', | |
preloader: false, | |
callbacks: { | |
beforeOpen: function() { | |
if($(window).width() < 700) { | |
this.st.focus = false; | |
} else { |