nn
This commit is contained in:
@@ -5,10 +5,17 @@
|
||||
|
||||
function calend_block($month, $year, $script=false){
|
||||
|
||||
if (strlen($month) == 1){
|
||||
$str_month = "0$month";
|
||||
}
|
||||
else{
|
||||
$str_month = "$month";
|
||||
}
|
||||
|
||||
$find_sql = "
|
||||
SELECT `post_id`
|
||||
FROM `wp_postmeta`
|
||||
WHERE `meta_key` = 'startevent' AND `meta_value` BETWEEN '$year-$month-01T00:00:00' AND '$year-$month-31T23:59:59'
|
||||
WHERE `meta_key` = 'startevent' AND `meta_value` BETWEEN '$year-$str_month-01T00:00:00' AND '$year-$str_month-31T23:59:59'
|
||||
";
|
||||
|
||||
|
||||
@@ -54,7 +61,7 @@ function calend_block($month, $year, $script=false){
|
||||
|
||||
foreach ($posts as $post){
|
||||
$eventdate = get_post_meta($post['ID'], 'startevent', true);
|
||||
$key = date('d.m.Y', strtotime($eventdate));
|
||||
$key = date('d.n.Y', strtotime($eventdate));
|
||||
$events[$key]['text'] = $post['post_title'];
|
||||
$events[$key]['link'] = get_permalink($post['ID']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user