Languages: English • 日本語 (Add your language)
This Conditional Tag checks whether widget is displayed on the front-end.
To be effective this function has to run after widgets have initialized, at action 'init' or later.
<?php is_active_widget( $callback, $widget_id, $id_base, $skip_inactive ); ?>
<?php if ( is_active_widget( false, false, $this->id_base, true ) ) { wp_enqueue_script( 'jquery' ); } ?>
Since: 2.2.0
is_active_widget() is located in wp-includes/widgets.php
.
Widgets: is_active_widget(), the_widget(), register_widget(), unregister_widget(), wp_register_widget_control(), wp_unregister_widget_control(), wp_convert_widget_settings(), wp_get_widget_defaults(), wp_widget_description()