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_filter( 'wpseo_xml_sitemap_img', '__return_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
User-agent: Yandex | |
Crawl-delay: 10 # | |
User-agent: * | |
Disallow: /search Crawl-delay: 10 # |
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
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
define('ALLOW_UNFILTERED_UPLOADS', true); |
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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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 sp_top_commentator_winners(){ | |
global $wpdb; | |
$length = 0; // Максимальная длинна имени в символах, если стоит 0, то имя не обрезается | |
$month = true; // true - за текущий месяц, false - за все время | |
$comment = true; // показывать количество комментариев | |
$nofollow = true; // ссылки nofollow | |
$count = 8; // количество комментаторов | |
$col = 4; // количество колонок | |
$avatarSize = 85; // размер аватара | |
$exceptionEmail = 'sneginka-anna@mail.ru, sneginka.anna@gmail.com'; // мыла-исключения |
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 awooc_translit($str = null, $flip = false){ | |
$tr = array( | |
"А"=>"A","Б"=>"B","В"=>"V","Г"=>"G","Д"=>"D", | |
"Е"=>"E","Ё"=>"Yo","Ж"=>"J","З"=>"Z","И"=>"I", | |
"Й"=>"Y","К"=>"K","Л"=>"L","М"=>"M","Н"=>"N", | |
"О"=>"O","П"=>"P","Р"=>"R","С"=>"S","Т"=>"T", | |
"У"=>"U","Ф"=>"F","Х"=>"H","Ц"=>"C","Ч"=>"Ch", | |
"Ш"=>"Sh","Щ"=>"Sch","Ъ"=>"","Ы"=>"Yi","Ь"=>"", | |
"Э"=>"E","Ю"=>"Yu","Я"=>"Ya","а"=>"a","б"=>"b", |
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 strip_domain_name( $uri = '' ) { | |
$uri = strtolower( trim( $uri ) ); | |
$uri = preg_replace( '%^(http:|https:\/\/)*(www.)*%usi', '', $uri ); | |
$uri = preg_replace( '%\/.*$%usi', '', $uri ); | |
return $uri; | |
} |
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 | |
/* | |
* Меняем слаг фида | |
*/ | |
add_filter( 'mihdan_yandex_turbo_feed_feedname', function ( $slug ) { | |
return 'recipe-yandex-turbo'; | |
} ); | |
/* | |
* Добавляем тип записи | |
*/ |
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_filter( 'woocommerce_register_post_type_product', 'wpse_modify_product_post_type' ); | |
function wpse_modify_product_post_type( $args ) { | |
$args['labels']['name'] = 'Магазин'; | |
$args['labels']['singular_name'] = 'Корона'; | |
$args['labels']['menu_name'] = 'Магазин'; | |
return $args; |
OlderNewer