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
** | |
* Изменить формат цены - вместо диапазона вывести "От: " | |
* | |
* @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
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
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
<div class="logos"> | |
<div class="front"><img src="img/spec-rus.svg" alt="УКС «Спецпартнер»" class="logo"></div> | |
<div class="back"><img src="img/spec-eng.svg" alt="UKS «Specpartner»" class="logo"></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
<?php while ( have_posts() ) : the_post(); ?> | |
<?php endwhile;?> |
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 change on your own scripts | |
wp_localize_script( 'custom', 'myajax', | |
array( | |
'url' => admin_url('admin-ajax.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
add_action( 'wp_ajax_misha', 'test_function' ); // wp_ajax_{ЗНАЧЕНИЕ ПАРАМЕТРА ACTION!!} | |
add_action( 'wp_ajax_nopriv_misha', 'test_function' ); // wp_ajax_nopriv_{ЗНАЧЕНИЕ ACTION!!} | |
// первый хук для авторизованных, второй для не авторизованных пользователей | |
function test_function(){ | |
$summa = $_POST['param1'] + $_POST['param2']; | |
echo $summa; | |
die; // даём понять, что обработчик закончил выполнение |
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: * | |
Disallow: / |
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( 'wpseo_canonical', '__return_false' ); |