WP FullCalendar
Customize and localize WP FC using wpfc_js_vars filter + bug fixed (2 posts)

  1. Christian
    Posted 2 years ago #

    Since the 0.8.3 release, there is a new filter in WPFC, called wpfc_js_vars, that you can use for customization and/or localization WP Fullcalendar.
    After some test and a bug fix here's how it works:

    In your function.php add your filter function and normaly it should be enough ;).

    add_filter( 'wpfc_js_vars', 'my_wpfc_js_vars' );
    function my_wpfc_js_vars($js_vars) {
                    $js_vars['wpfc_locale']['allDayText']='Journée'; // French translation
                    $js_vars['wpfc_locale']['axisFormat']='HH(:mm)'; // 24H format
                    $js_vars['wpfc_locale']['minTime']='8:00';       // lazy...
                    return $js_vars;

    But Markus, I found a bug in the way this filter is called.

    In wp-fullcalendar you must replace the 2 last lines of localize_script function by this one :

    wp_localize_script('wp-fullcalendar','WPFC',apply_filters('wpfc_js_vars', $js_vars));

  2. angelo
    NetWebLogic Support
    Posted 2 years ago #

    thanks, will let Marcus know about this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP FullCalendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.