WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Sidebars
Adding return value to method dynamic_sidebar() (1 post)

  1. JochenT
    Member
    Posted 2 years ago #

    I've played a bit with plugin and I am excited.

    I want suggest one small improvement. In the case a sidebar is defined in a post/page but itself is set to status draft the method $MultipleSidebars->is_active_sidebar() returns true although no sidebar is shown. In this case it would be desirable to have a possibility to display a fallback sidebar.
    This could be reached if method $MultipleSidebars->dynamic_sidebar() returns a boolean value from the calls to the original WP function dynamic_sidebar(). As this call may executed multiple times in your method I use following modification:

    $success = false;
     // ...
     $success = dynamic_sidebar($sidebar) ? true : $success;
     // ...
     return $success;

    http://wordpress.org/extend/plugins/multiple-sidebars/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic