select
t1.*,
t2.*,
t3.*
from
TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS t1
join TABLE_PRODUCTS t2 on t2.products_id = t1.products_id
join TABLE_PRODUCTS_DESCRIPTION t3 on t3.products_id = t1.products_id
where t1.products_extra_fields_id = '4'
and t1.products_extra_fields_value = 'Y'
limit 5
add_action('admin_bar_init', function(){
add_action('wp_before_admin_bar_render', 'adminbar_styles');
});
function adminbar_styles(){
if( is_admin() ) return;
echo preg_replace('/[\n\t]/','','
<style>
@media (max-width:768px) {
#wpadminbar {display:none;}
html {margin-top:0!important;}
}
</style>')."\n";
}
<?php
$aMenuLinks = Array(
Array(
"Пункт меню",
"/link/",
Array(),
Array(
'noindex' => true,
),
""
),
);
<script>
$(document).ready(function() {
$('a.myClass').removeClass('myClass');
$('img').parent('a').addClass('myClass');
});
</script>
$(document).ready(function() {
$('a.myClass').filter(function(item) {
return $('>img',$(item)).length == 0
}).removeClass('myClass');
});
const childSelector = 'img';
const className = 'myclass';
$(`.${className}:not(:has(> ${childSelector}))`).removeClass(className);
document.querySelectorAll(`.${className}`).forEach(n => {
n.classList.toggle(className, !!n.querySelector(`:scope > ${childSelector}`));
});
const elems = document.getElementsByClassName(className);
for (let i = elems.length; i--;) {
if (!Array.prototype.some.call(elems[i].children, n => n.matches(childSelector))) {
elems[i].classList.remove(className);
}
}