Синхронизация настроек Sublime Text 3 e02de7830ee606bb0e8fe915387089b2c7d581ec токен
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
add_filter( 'the_content', 'morkovin_add_noindex_img_cap', 1000 ); | |
function morkovin_add_noindex_img_cap( $content ) { | |
$pattern = "/<p class=\"wp-caption-text\">([^<]+)<\/p>/i"; | |
$replacement = "<!--noindex--><p class=\"wp-caption-text\">$1</p><!--/noindex-->"; | |
$content = preg_replace($pattern, $replacement, $content); | |
$pattern = "/<div class=\"wp-caption-text\">([^<]+)<\/div>/i"; | |
$replacement = "<!--noindex--><div class=\"wp-caption-text\">$1</div><!--/noindex-->"; | |
$content = preg_replace($pattern, $replacement, $content); | |
return $content; | |
} |
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
/* Visual Bootstrap 3 grid by PixelSPB, v. 1.0b В© 2018, All rights reserved */ | |
jQuery(document).ready(function($) { | |
var cols = 12; // numCols | |
$('head').append('<style>.showHideVisualGrid{display:none;}\n.pixelGridShowHide input[type="checkbox"] {margin: 0; width: auto !important; height: auto !important; margin-right: 10px !important;}\n.pixelVisualGrid{top:0; bottom:0; left:0; right:0; z-index:9997; display:none; position:fixed;}\n.pixelVisualGrid.showVisualGrid{display:block;}\n.v100{height: 100vh;}\n.pixelVisualGrid .visualGridContentZone{background:#ffb600;}\n.pixelVisualGrid .colWhiteSpace{background:#ebebeb; opacity:0.3;}\n.pixelVisualGrid .colWhiteSpace.transparentWhiteSpace{background:transparent;}\n.pixelGridColNumHide{display:none;}\n.pixelVisualGrid.grayscale .visualGridContentZone{background:#bfbfbf}\n.showHideVisualGrid{position:fixed; top:0; right:0; z-index:9998; padding:20px; background:#fff; border-radius: 0 0 0 10px;}\n.pixelGridShow{width:30px; height:30px; position:fixed; z-index:9 |
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
-------С www на не-www------- | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www.sdelaysite\.com$ [NC] | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] |
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
User-agent: Yandex | |
Disallow: /wp-admin | |
Disallow: /wp-includes | |
Allow: /wp-includes/js/* | |
Disallow: /wp-login.php | |
Disallow: /wp-register.php | |
Disallow: /xmlrpc.php | |
Disallow: *?s* | |
Disallow: *?preview=true* | |
Disallow: */trackback/ |
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
/* custom-reset.css | 27.08.2018 | https://yurch-html.github.io/dist/custom-reset.html */ | |
*, | |
*:before, | |
*:after { | |
box-sizing: inherit; | |
} | |
html { | |
box-sizing: border-box; |
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) Находим в проекте wordpress файл, который называется formatting.php (должен лежать в папке wp-includes) | |
2) В этом файле находим функцию, которая называется wpautop | |
3) Там находим переменную $allblocks (188 строка должна быть) | |
4) Туда дописываем img | |
5) PROFIT! |
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
<main class="container-fluid main-section dark pattern" id="brewers" style="background-image: url(<?php echo the_field ('patternbg', 80); ?>);"> | |
<section class="container"> | |
<img src="<?php echo the_field ('lightvensel', 80); ?>" alt="" class="divider"> | |
<h2 class="seo-page-title"><?php echo get_the_title() ?></h2> | |
<p class="seo-page-description"><?php echo get_the_excerpt( ) ?></p> | |
</section> | |
<?php | |
$categories = get_categories(['parent' => 9,]); |
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 | |
$id=4; // ID заданной рубрики | |
$n=5; // количество выводимых записей | |
$recent = new WP_Query("cat=$id&showposts=$n"); | |
while($recent->have_posts()) : $recent->the_post(); | |
?> | |
<div> | |
... | |
</div> |
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
// Javascript to enable link to tab | |
var url = document.location.toString(); | |
if (url.match('#')) { | |
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); | |
} | |
// Change hash for page-reload | |
$('.nav-tabs a').on('shown.bs.tab', function (e) { | |
window.location.hash = e.target.hash; | |
}) |
NewerOlder