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
//Пассивные прослушиватели событий не используются для улучшения производительности при прокрутке | |
//© Калинский Евгений aka seojacky (https://t.me/big_jacky) | |
add_action( 'wp_footer', 'script_passive_event_listeners', 99 ); | |
function script_passive_event_listeners(){ | |
?> | |
<script> | |
(function () { | |
var supportsPassive = eventListenerOptionsSupported(); | |
if (supportsPassive) { |
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
//Пример фрагмента .htaccess (из плагина FastestCache) для решения ошибки "Задайте правила эффективного использования кеша для статических объектов" в PageSpeed | |
//это просто пример! не копируйте его на свой сайт! | |
//в данном примере задано время кеширования 1 Год | |
// обычно это даёт + 2-4 балла по PageSpeed | |
//© Калинский Евгений aka seojacky (https://t.me/big_jacky) | |
//По вопросам оптимизации сайтов по требованиям PageSpeed пишите в Telegram https://t.me/big_jacky | |
/* | |
* Мои плагины для ускорения сайта: | |
* True Lazy Analytics https://wordpress.org/plugins/true-lazy-analytics/ |
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 | |
/** | |
* The template for displaying all single posts | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
* | |
* @package Beezzly | |
*/ |
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 id="watch7-content" class="watch-main-col" itemscope="" itemid="" itemtype="http://schema.org/VideoObject"> | |
<link itemprop="url" href="https://www.youtube.com/watch?v=SSesEP5-9rM"> | |
<meta itemprop="name" content="Плагин для микроразметки видео с YouTube по Schema.org #wordpress"> | |
<meta itemprop="description" content="Инструкция по использованию плагина для разметки по Schema.org видероликов с YouTubeСильно упрощает сам процесс разметки не требуется никаких знаний хтмл или..."> | |
<meta itemprop="paid" content="False"> | |
<meta itemprop="channelId" content="UCml9k9gl6NwWxsqHQwLQ6fQ"> | |
<meta itemprop="videoId" content="SSesEP5-9rM"> | |
<meta itemprop="duration" content="PT6M50S"> | |
<meta itemprop="unlisted" content="False"> | |
<span itemprop="author" itemscope="" itemtype="http://schema.org/Person"> |
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
<!-- @author Калинский Евгений aka seojacky (https://t.me/big_jacky) --> | |
<!-- в некоторых случаях нужно менять method="get" на method="post" --> | |
<form class="" target="_blank" action="https://" method="get"> | |
<button type="submit">Скачать</button> | |
</form> |
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 | |
/* Async CSS */ | |
add_filter( 'style_loader_tag', 'async_css_change_attribute', 10, 2 ); | |
function async_css_change_attribute($link, $handle) { | |
$marks = array( | |
'hide-admin-bar-based-on-user-roles', | |
'post-views-counter-frontend', | |
'wsl-widget', | |
'slick-theme', |
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
/** | |
* Remove the generated product schema markup from Product Category and Shop pages. | |
*/ | |
/* | |
* ОЧень спорно!!!!! Зачем убирать????? | |
*/ | |
/*add_action( 'woocommerce_init', 'wc_remove_product_schema_product_archive' ); | |
function wc_remove_product_schema_product_archive() { | |
remove_action( 'woocommerce_shop_loop', array( WC()->structured_data, 'generate_product_data' ), 10, 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_head', function() { | |
?> | |
<!-- DevisedLabs Very Large Image LCP Hack --><img width="99999" height="99999" class="skip-lazy" style="pointer-events: none; position: absolute; top: 0; left: 0; width: 99vw; height: 99vh; max-width: 99vw; max-height: 99vh;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI5OTk5OXB4IiBoZWlnaHQ9Ijk5OTk5cHgiIHZpZXdCb3g9IjAgMCA5OTk5OSA5OTk5OSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZyBzdHJva2U9Im5vbmUiIGZpbGw9Im5vbmUiIGZpbGwtb3BhY2l0eT0iMCI+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9Ijk5OTk5IiBoZWlnaHQ9Ijk5OTk5Ij48L3JlY3Q+IDwvZz4gPC9zdmc+"> | |
<?php | |
} ); |
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 | |
//Disable Loading lazy for thumbnail | |
function disable_template_image_lazy_loading( $default, $tag_name, $context ) { | |
if ( 'img' === $tag_name && 'wp_get_attachment_image' === $context ) { | |
return false; | |
} | |
return $default; | |
} | |
add_filter( | |
'wp_lazy_loading_enabled', |
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
/*! jQuery & Zepto Lazy - iFrame Plugin v1.5 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */ | |
! function(t) { | |
t.lazy(["frame", "iframe"], "iframe", function(r, a) { | |
var e = this; | |
if ("iframe" === r[0].tagName.toLowerCase()) { | |
var o = r.attr("data-error-detect"); | |
"true" !== o && "1" !== o ? (r.attr("src", r.attr("data-src")), e.config("removeAttribute") && r.removeAttr("data-src data-error-detect")) : t.ajax({ | |
url: r.attr("data-src"), | |
dataType: "html", | |
crossDomain: !0, |
NewerOlder