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 | |
/** | |
* The template for displaying all single posts | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
* | |
* @package Beezzly | |
*/ |
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
<!-- @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 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 | |
/* 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 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
/** | |
* 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 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 | |
//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 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 & 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, |
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 | |
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 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 add_last_nav_item($items) { | |
$items .= '<button class="btn_link" onclick="window.open(https://miracle-workers.ru/contact/);">Контакты</button>'; | |
// $items .= '<form action="https://miracle-workers.ru/contact/"><button type="submit">Контакты</form>'; //другой вариант, без джс | |
//$items .= '<li>'.get_search_form(false) . '</li>'; //добавляем поиск | |
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 tlap_plugin_default_values(){ | |
$defaults = array( | |
'tlap_add_analytics_option' => array( | |
'tlap_excludepage' => '', | |
'tlap_timer_delay' => '5000', | |
), | |
'tlap_add_analytics_option_counters' => array( |
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 tlap_activation(){ | |
do_action( 'tlap_default_options' ); | |
} | |
register_activation_hook( __FILE__, 'tlap_activation' ); | |
// Set default values here | |
function tlap_plugin_default_values(){ | |
$default = array( | |
'tlap_add_analytics_option' => array( | |
'tlap_excludepage' => '', |
NewerOlder