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
.logo | |
display: block | |
max-width: 135px | |
.header | |
// styles wrapper | |
.header__inner | |
height: 75px | |
display: flex |
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 | |
function construct_telegram_text($arr) { | |
$str = ''; | |
foreach($arr as $row){ | |
$str .= '*'.$row[0].'*: '.$row[1]."\r\n"; | |
} | |
return $str; | |
} |
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 | |
include 'PHPMailer.php'; | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; | |
/* | |
К форме добавить класс = js-form | |
<input type="hidden" name="action" value="Название формы которое будет ниже"> | |
везде прописать name и получать ниже как в образце | |
*/ |
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
const contentHeight = | |
$('header')[0].offsetHeight + | |
$('main')[0].offsetHeight + | |
$('footer')[0].offsetHeight | |
if ($(window).height() > contentHeight) { | |
const toAdd = $(window).height() - contentHeight | |
const height = $('main')[0].offsetHeight + toAdd | |
$('main').css('height', height + 'px') | |
} |
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 | |
// Плагин wp multilang https://ru.wordpress.org/plugins/wp-multilang/ | |
// custom switcher | |
/* | |
При вызове выводит список языков с такой вёрсткой | |
<div class="lang-header"> | |
<a href="#" class="lang-header__item active">RU</a> |
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 | |
$fmt = new NumberFormatter( 'ru_RU', NumberFormatter::CURRENCY ); | |
$fmt->setAttribute(NumberFormatter::FRACTION_DIGITS, 0); | |
$fmt->setSymbol(NumberFormatter::CURRENCY_SYMBOL, '₽'); | |
$price = $fmt->formatCurrency($price, "RUR")."\n"; | |
// Function | |
function beauty_price_value($value = 0, $currency = 'rub') { |
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
.item { | |
/* safari overflow hidden, border-radius */ | |
-webkit-mask-image: -webkit-radial-gradient(white, black); | |
} |
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
/* r-tabs */ | |
.r-tabs .r-tabs-panel { | |
padding: 20px; | |
} | |
.r-tabs-tab a, | |
.r-tabs-accordion-title a { | |
padding: 10px 15px; | |
background: #f7f7f7; | |
color: #3c3c3c; |
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
Дайте команду в терминале | |
$ git --version | |
И если вы увидите что то вроде этого | |
git version 1.9.3 (Apple Git-50) | |
то это статья для вас. Если вы видите версию 2.3.1 (на момент написания статьи) последняя была такая, то тогда у вас все хорошо. |
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 | |
function get_post_image($id, $placeholder_path) { | |
$post = get_post($id); | |
$content = $post->post_content; | |
$regex = '/src="([^"]*)"/'; | |
preg_match( $regex, $content, $matches ); | |
if (!empty($matches)) { | |
return $matches[1]; | |
} elseif (get_the_post_thumbnail_url($id)) { |
NewerOlder