Changeset 11164 for trunk/wp-includes/widgets.php
- Timestamp:
- 05/03/2009 11:20:26 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/widgets.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r11160 r11164 817 817 * @param int $widget_id Optional, but needed for checking. Widget ID. 818 818 * @param string $id_base Optional, the base ID of a widget created by extending WP_Widget. 819 * @param bool $skip_inactive Optional, whether to check in 'wp_inactive_widgets'. 819 820 * @return mixed false if widget is not active or id of sidebar in which the widget is active. 820 821 */ 821 function is_active_widget($callback = false, $widget_id = false, $id_base = false ) {822 function is_active_widget($callback = false, $widget_id = false, $id_base = false, $skip_inactive = true) { 822 823 global $wp_registered_widgets; 823 824 … … 826 827 if ( is_array($sidebars_widgets) ) { 827 828 foreach ( $sidebars_widgets as $sidebar => $widgets ) { 829 if ( $skip_inactive && 'wp_inactive_widgets' == $sidebar ) 830 continue; 831 828 832 if ( is_array($widgets) ) { 829 833 foreach ( $widgets as $widget ) {
Note: See TracChangeset
for help on using the changeset viewer.