• B.

    (@bandonrandon)


    I’m trying to use the plugin Magic Fields 2 to set the event start time end time and end date. However, it appears that the start date is being hardcoded in the ajax function in wp-fullcalendar.php I found this line:

    $post_date = substr($post->post_date, 0, 10);

    Is there a filter that can be used to override this with custom time/date?

    http://wordpress.org/extend/plugins/wp-fullcalendar/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I’m going to add/change this line so you can add your own filter

    $item = array ("title" => $title, "color" => $color, "start" => date('Y-m-d\TH:i:s', $post_timestamp), "end" => date('Y-m-d\TH:i:s', $post_timestamp), "url" => get_permalink($post->ID), 'post_id' => $post->ID );
    $items[] = apply_filters('wpfc_ajax_post', $item, $post);
    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    that’d be around line 193

    Thread Starter B.

    (@bandonrandon)

    Thanks Marcus,

    Can you give a quick example of how to filter this. I’m assuming it would be something like.

    my_nifty_function($item,$post){
      $item['start'] = the_post_meta('custom_start');
      $item['end'] = the_post_meta('custom_end');
    
     return items[];
    }
    add_filter('wpfc_ajax_post','my_nifty_function')

    Is this on the right track?

    Thanks!

    Hi all any word on this? I would love to use a custom field for this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Custom Post Date/time’ is closed to new replies.