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
define('SITE_LANG', pll_current_language('slug')); | |
if (function_exists('pll_register_string')) { | |
pll_register_string('Chat with us', 'Discute avec nous', 'Theme'); | |
} | |
// for custom post type add lang | |
add_filter( 'pll_get_post_types', 'add_cpt_to_pll', 10, 2 ); | |
function add_cpt_to_pll( $post_types, $is_settings ) { |
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
RewriteCond %{HTTP_HOST} ^www\.(.*) | |
RewriteRule ^.*$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} !on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [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
** | |
* Изменить формат цены - вместо диапазона вывести "От: " | |
* | |
* @param float $price Цена товара. | |
* @param object $product Товар. | |
* @return string | |
*/ | |
function variable_price_format_filter( $price, $product ) { | |
$prefix = 'От: '; |
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 echo antispambot();?> |
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
DELETE FROM wp_posts WHERE post_type = "revision"; |
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_action('init', 'mp_register_reviews'); | |
function mp_register_reviews(){ | |
register_post_type('reviews', array( | |
'labels' => array( | |
'name' => 'Отзывы', // Основное название типа записи | |
'singular_name' => 'Отзыв', // отдельное название записи типа Book | |
'add_new' => 'Добавить новый отзыв', | |
'add_new_item' => 'Добавить новый отзыв', | |
'edit_item' => 'Редактировать отзыв', | |
'new_item' => 'Новый отзыв', |
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
.expl { | |
background-image: url("data:image/svg+xml;utf8,<svg width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill: none; stroke: #d9d3cb; stroke-width: 4; stroke-dasharray: 8 8'/></svg>"); | |
} |
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 for Load More | |
* | |
*/ | |
function be_load_more_js() { | |
$query = array( | |
'posts_per_page' => 6, | |
'post_type' => 'reviews' |
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
//Склонение числительных | |
function declOfNum(n, titles) { | |
return titles[(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)]; | |
} | |
/* | |
use: declOfNum(count, ['найдена', 'найдено', 'найдены']); | |
*/ |
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
<div class="menu-wrapper"> | |
<div class="hamburger-menu"></div> | |
</div> | |