Skip to content

Instantly share code, notes, and snippets.

View muks999's full-sized avatar

Muks999 muks999

View GitHub Profile
@muks999
muks999 / switchOFF jqmigrate
Created February 4, 2019 10:37
Отключаем сообщение «JQMIGRATE: Migrate is installed, version 1.4.1»
add_action('wp_default_scripts', function ($scripts) {
if (!empty($scripts->registered['jquery'])) {
$scripts->registered['jquery']->deps = array_diff($scripts->registered['jquery']->deps, ['jquery-migrate']);
}
});
@muks999
muks999 / DIVI "hacks" styles inline?
Last active January 11, 2019 23:43
DIVI "hacks" style
<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,
@muks999
muks999 / DIVI "hacks" sticky script +Scripts
Last active January 11, 2019 23:42
DIVI "hacks" sticky script + Scripts
<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;
@muks999
muks999 / DIVI menu animations
Created January 11, 2019 23:32
DIVI menu animations
/*Grow Underline*/
#top-menu a {
display: block;
position: relative;
color: rgba(231, 13, 13, 0.89);
text-decoration: none;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
@muks999
muks999 / DIVI FOOTER MENU BAR ALIGNMENT
Last active January 11, 2019 22:34
DIVI FOOTER MENU BAR ALIGNMENT
@muks999
muks999 / DIVI FOOTER BOTTOM BAR ALIGNMENT
Created January 11, 2019 22:27
FOOTER BOTTOM BAR ALIGNMENT
@muks999
muks999 / gist:954b69d65b65853a6f683d0ad6e1edda
Last active December 11, 2018 15:31
Расстановка переносов в html тексте на русском языке
/*Вызывается, как и любой jquery плагин:
$(function() { $('.article-text').hyphenate(); })
http://vyachet.ru/blog/2014/08/14/hyphen-russian-html-text/ -ссылка на оригинал статьи
http://jsfiddle.net/swed/94crypw7/ -демонстрация работы плагина*/
$.fn.hyphenate = function() {
var all = "[абвгдеёжзийклмнопрстуфхцчшщъыьэюя]",
glas = "[аеёиоуыэю\я]",
@muks999
muks999 / Change title for seo
Last active October 19, 2018 06:47
смена тайтла в зависимости от шаблона
//если шаблон 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=
@muks999
muks999 / смена шаблона modx
Last active October 11, 2018 08:40
Массовая смена шаблона в MODxREVO
$resources = $modx->getCollection('modResource',array('parent' => 19)); //берем ресурсы из категории "19"
foreach ($resources as $res) {
$res->set('template', 3); //устанавливаем им шаблон "3"
$res->save(); //сохраняем...
}
@muks999
muks999 / .htaccess
Created October 9, 2018 13:03 — forked from artikus11/.htaccess
Заготовка для подключения браузерного кеширования
Включение кеша браузера
=====
Вариант 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"