function cf_search_join( $join ) {
global $wpdb;
if ( is_search() ) {
$join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
}
return $join;
}
add_filter( 'posts_join', 'cf_search_join' );
function cf_search_where( $where ) {
global $pagenow, $wpdb;
if ( is_search() ) {
$where = preg_replace(
"/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/",
"(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where );
}
return $where;
}
add_filter( 'posts_where', 'cf_search_where' );
function cf_search_distinct( $where ) {
global $wpdb;
if ( is_search() ) {
return "DISTINCT";
}
return $where;
}
add_filter( 'posts_distinct', 'cf_search_distinct' );
const player = document.createElement('video');
player.src = '/path/to/file.avi');
.grid {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
}
.grid::after {
content: "";
flex: auto;
}
v=spf1 include:servers.mcsv.net include:_spf.yandex.ru ?all
const myPlacemark = new ymaps.Placemark([ 59.8755, 30.3955 ], {
hintContent: '<b>Адрес/метро:</b> Белы Куна 21-Н, 1й этаж/ м.Международная <br> <b>Площадь:</b> 45 м <br> <b>Стоимость:</b> 70 000 р. в мес. + К/У' ,
iconContent: 'Магазин (нежилой фонд)'
}, {
preset: 'islands#darkGreenStretchyIcon'
});
$('.js-book-tour-individual').attr('data-num-participants')
CJSCore::Init ();
AddEventHandler("main", "OnEndBufferContent", "deleteKernelJs");
function deleteKernelJs(&$content) {
global $USER, $APPLICATION;
if((is_object($USER) && $USER->IsAuthorized()) || strpos($APPLICATION->GetCurDir(), "/bitrix/")!==false) return;
if($APPLICATION->GetProperty("save_kernel") == "Y") return;
$arPatternsToRemove = Array(
'/<sc ript.+?src=".+?kernel_main\/kernel_main\.js\?\d+"><\/sc ript\>/',
'/<sc ript.+?src=".+?bitrix\/js\/main\/core\/core[^"]+"><\/sc ript\>/',
'/<sc ript.+?>BX\.(setCSSList|setJSList)\(\[.+?\]\).*?<\/sc ript>/',
'/<sc ript.+?>if\(\!window\.BX\)window\.BX.+?<\/sc ript>/',
'/<sc ript[^>]+?>\(window\.BX\|\|top\.BX\)\.message[^<]+<\/sc ript>/',
);
$content = preg_replace($arPatternsToRemove, "", $content);
$content = preg_replace("/\n{2,}/", "\n\n", $content);
}