[Plugin: Multiple Sidebars] Adding return value to method dynamic_sidebar()
-
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;
The topic ‘[Plugin: Multiple Sidebars] Adding return value to method dynamic_sidebar()’ is closed to new replies.