WordPress.org

Ready to get started?Download WordPress

Forums

Booking Calendar
[resolved] $args for widget? (5 posts)

  1. islandcastaway
    Member
    Posted 3 years ago #

    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

    http://wordpress.org/extend/plugins/booking/

  2. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. islandcastaway
    Member
    Posted 3 years ago #

    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?

  4. islandcastaway
    Member
    Posted 3 years ago #

    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?

  5. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

    Yes, its seems fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags