• Resolved islandcastaway

    (@islandcastaway)


    I didn’t see in my error log before that my iframe embed code was not correct.

    What is the correct usage of
    show_booking_widget_php4(); ?

    I was using
    show_booking_widget_php4(1);
    and getting the error:
    PHP Warning: extract() [<a href='function.extract'>function.extract</a>]: First argument should be an array in /wp-content/plugins/booking/wpdev-booking.php on line 3692

    Cheers

    https://www.ads-software.com/extend/plugins/booking/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello,
    here is parameters
    $defaults = array(
    ‘name’ => sprintf(__(‘Sidebar %d’), $i ),
    ‘id’ => “sidebar-$i”,
    ‘description’ => ”,
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => “\n”,
    ‘before_title’ => ‘<h2 class=”widgettitle”>’,
    ‘after_title’ => “</h2>\n”,
    );
    which are sending by default inside of that function from wordpress engine.
    But as far as I am see you are already made other solution with iframe at the next topic.

    Thread Starter islandcastaway

    (@islandcastaway)

    The iframe concept is working. It does show the calendar.

    The problem is php-errors log is showing:
    First argument should be an array in show_booking_widget_php4(1);
    when its called.

    So how would I write that to call it from outside your plugin?

    show_booking_widget_php4('','','','','',);
    or what?

    Thread Starter islandcastaway

    (@islandcastaway)

    OK, I put this on the frame page:

    <?php
    
    $defaults = array(
    'name' => '',
    'id' => '',
    'description' => '',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '',
    'after_title' => '',
    );
    
    show_booking_widget_php4($defaults); ?>

    It works and no php errors.

    Is this correct?

    Plugin Author wpdevelop

    (@wpdevelop)

    Yes, its seems fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Booking Calendar] $args for widget?’ is closed to new replies.