add correct meta calendar
This commit is contained in:
@@ -6,6 +6,9 @@ define("COOK_VALUE", "7895");
|
||||
|
||||
require get_template_directory().'/src/calend-block.php';
|
||||
require get_template_directory().'/src/calendar.php';
|
||||
require ABSPATH.'vendor/masterforweb/db_lite/db_lite.php';
|
||||
|
||||
db_config(DB_NAME, 'mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);
|
||||
|
||||
# регистрируем меню
|
||||
register_nav_menus(array(
|
||||
@@ -264,4 +267,36 @@ if (!function_exists('view')){
|
||||
return trim(ob_get_clean());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function arr_to_in($items){
|
||||
|
||||
$in = array();
|
||||
|
||||
foreach ($items as $item){
|
||||
|
||||
$in[] = $item['post_id'];
|
||||
}
|
||||
|
||||
return $in;
|
||||
|
||||
}
|
||||
|
||||
function str_to_in($items){
|
||||
|
||||
$in = '';
|
||||
|
||||
foreach ($items as $item){
|
||||
|
||||
if ($in !== '') {
|
||||
$in .= ',';
|
||||
}
|
||||
|
||||
|
||||
$in .= $item['post_id'];
|
||||
}
|
||||
|
||||
return $in;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user