• antonio-piha

    (@antonio-piha)


    To fix use of shortcode “year” attribute:

    1) edit the “calendar.php” in plugin, then change the 10th line:
    $current_year = get_the_time( ‘Y’ );
    to
    $current_year = $year;

    2) edit the “index.php” in line 129:
    from this:
    $args = array( ‘year’ => $this->year );
    to:
    $args = array( ‘year’ => $year );

    3) when this is applied you should be able to use the following:
    [availability calendar=”calendarId” year=”2014″]
    and the year 2014 will be displayed.

    https://www.ads-software.com/plugins/availability/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thank you for this fix. It works. I will ask developer to include it in plugin (if next version ever happens).

    anonymized-13603639

    (@anonymized-13603639)

    I don’t understand why I have do edit the code because I use the syntax already, as you describe. Without modification.
    Is there a bug I never realized? Maybe?!

    Can you explain why you edit the code? What happen if you don’t modify it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[FIX] use year shortcode attribute correctly’ is closed to new replies.