нафига такие вложенные конструкции писать-то? черт ногу сломит..
define('URL_HOME', 'http://'.$_SERVER['HTTP_HOST'].str_replace('index.php', '', $_SERVER['PHP_SELF']));
bash от shell отличается, что за ipconfig
<?php
$checkbox_params = array('Intel', 'AMD', 's775');
if (empty(array_intersect_key(array_keys($_GET), $checkbox_params))) {
echo "no posts";
} else {
$true_args = array();
$processor_manufacturers = array('Intel', 'AMD');
$socket_manufacturer = 's775';
$queried_proc_manufacturers = array_intersect_key(array_keys($_GET), $processor_manufacturers);
foreach ($queried_proc_manufacturers as $proc_manufacturer) {
$arg = array(
'meta_query' => array(
array(
'key' => 'manufacturer_processor_pc',
'value' => strtolower($proc_manufacturer),
)
)
);
array_push($true_args, $arg);
}
if (isset($_GET['s775'])) {
$arg = array(
'meta_query' => array(
array(
'key' => 'soket_processor_pc',
'value' => strtolower($socket_manufacturer),
)
)
);
array_push($true_args, $arg);
}
$true_query = new WP_Query( $true_args );
}