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
document.addEventListener( "DOMContentLoaded", function( event ) { | |
var minLength = 20; // set for how many characters | |
var targetTextarea = document.querySelector( ".comment-form-comment textarea" ); | |
var charsNotification = document.querySelector( ".comment-notes" ); | |
var addedElement = document.createElement('span'); | |
addedElement.className = 'comment-notification'; | |
addedElement.style.cssText = 'color:red;background-color:yellow'; | |
addedElement.appendChild(document.createTextNode('')); | |
charsNotification.appendChild(addedElement); |
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
function my_shortcode_function($atts) { | |
extract(shortcode_atts(array( | |
"summ" => 'укажите параметр summ (в батах)', | |
"currency" => 'укажите параметр currency (USD, RUR)' | |
), $atts)); | |
// Путь к файлу c курсами | |
//$file_course_of_exchange = "https://site.ru/wp-content/themes/yume-child/data.txt"; | |
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
@keyframes big-show{0%{opacity: 0}100%{opacity: 1}}@keyframes hidden{0%{opacity: 0}99%{opacity: 0}100%{opacity: 1}}@keyframes dark{0%{opacity: 0}100%{opacity: 0.7}}.picture-big{position: fixed;top: 40px;left: 20px;right: 20px;bottom: 40px;background-repeat: no-repeat;background-size: contain;background-position: center;animation: big-show 1s;z-index: 99999}.picture-big-mobile{left: 5px;right: 5px;top: 5px;bottom: 5px}.popup-open,[data-popup="true"]{cursor: zoom-in}.till-popup-close{ | |
position: absolute; | |
font-size: 3rem; | |
cursor: pointer; | |
font-weight: 600; | |
color: white; | |
line-height: 1; | |
text-align: center; | |
right: 1rem; | |
width: 3rem; |
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
add_action('template_redirect', function () { | |
ob_start(function ($buffer) { | |
global $wpco_html; | |
$buffer = str_replace('<source', '<source class="mihdan-lozad" ', $buffer); | |
return $buffer; | |
}); | |
}); |
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 | |
$id = '7QU1nvuxaMA'; | |
$json = file_get_contents("https://www.youtube.com/oembed?url=youtube.com/watch?v=".$id."&format=json"); | |
//var_dump(json_decode($json)); | |
//var_dump(json_decode($json, true)); | |
$obj = json_decode($json); | |
print "<b>title:</b> ". $obj->{'title'} ."<br>"; | |
print "<b>author_name:</b> ". $obj->{'author_name'} ."<br>"; |
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
<?php | |
/* этот код удаляет type="text/javascript" | |
и пустые строки в исходном коде | |
Вопрос: Как в зависимости от настроек $remove_type_text_javascript_css и $remove_empty_string вкл/выкл опции? | |
Конструкция if внутри ob_start(function ($buffer) не работает | |
*/ | |
$remove_type_text_javascript_css = true; | |
$remove_empty_string = false; |
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
"function"==typeof jQuery&&jQuery(document).ready(function(a){a("body").on("post-load",function(){window.a2a&&a2a.init_all()})}); |
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 | |
/* | |
Другие плагины для добавления <meta name="robots" content="noindex" />: | |
Этот плагин https://wordpress.org/plugins/noindex-seo/ | |
Easy Noindex And Nofollow https://wordpress.org/plugins/easy-noindex-and-nofollow/ | |
- noindex для Search Page, Category Page | |
Noindex Pages https://wordpress.org/plugins/noindex-pages/ |