:root {
--red: 200;
}
.block input[type="radio"]:checked ~ .test1 {
background: rgb(calc(var(--red) * 0.1), 100, 100);
}
.block input[type="radio"]:checked ~ .test2 {
background: rgb(calc(var(--red) * 0.2), 100, 100);
}
.block input[type="radio"]:checked ~ .test3 {
background: rgb(calc(var(--red) * 0.3), 100, 100);
}
.block input[type="radio"]:checked ~ .test4 {
background: rgb(calc(var(--red) * 0.4), 100, 100);
}
.block input[type="radio"]:checked ~ .test5 {
background: rgb(calc(var(--red) * 0.5), 100, 100);
}
.iframe_block_ise{
width:100px;
overflow-x: hidden;
overflow: scroll;
}
add_shortcode ('wp-r_dop_filter_ise','cod');
function cod($test_array){
$return='<h3>hello'.$test_array['tes1'].'</h3>';
for ($i = 1; $i <= $test_array['tes1'].; $i++) {
$return.='<h3>hello'.$i.'</h3>';
}
return $return;
}
cod($test)
for ($i = 1; $i <= $test['tes1']; $i++) {
$return.='<h3>hello'.$i.'</h3>';
}
Вопрос-то в чем? "работали правильно" - это как?
.load не хочет запускаться если он не внутри $('document').ready но когда он внутри .ready то код выполняется дважды.
<div class="balans_image">
<div class="article">
<div class="absol">ghyy</div>
<img href="ff.jpg" id="id_image"/>
</div>
</div>
$('.article img').load(function(){
$(this).removeAttr("width")
.removeAttr("height")
.css({ width: "", height: "" });
var width = $(this).width();
var height = $(this).height();
var gen_with = document.querySelector('.balans_image').scrollWidth / width;
var gen_high = document.querySelector('.balans_image').scrollHeight / height;
var dilete = Math.min(gen_with, gen_high);
$('.article').css('height', height * dilete);
$('.article').css('width', width * dilete);
document.getElementById("id_image").style.height = (height * dilete)+"px";
document.getElementById("id_image").style.width = "100%";
});
echo __FILE__;
Но по сути он не чем не отличается от $_SERVER[PHP_SELF]
$_SERVER['DOCUMENT_ROOT'].'/wor/wp-content/uploads/'
localhost/wor/wp-content/uploads/pop/2019.04.14.04...
unlink('C:/xampp/htdocs/wor/wp-content/uploads/pop/2019.04.14.04.15.06.5500TAecwqVsg.jpg');
Все равно даже если сделать с помощью js код получается весьма длинным