WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 1151 | } |
| 1152 | } |
| 1153 | } |
| 1154 | |
| 1155 | $sidebars_widgets = wp_get_sidebars_widgets(); |
| 1156 | if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) { |
| 1157 | /** This action is documented in wp-includes/widgets.php */ |
| 1158 | do_action( 'dynamic_sidebar_before', $index, false ); |
| 1159 | /** This action is documented in wp-includes/widgets.php */ |
| 1160 | do_action( 'dynamic_sidebar_after', $index, false ); |
| 1161 | /** This filter is documented in wp-includes/widgets.php */ |
| 1162 | return apply_filters( 'dynamic_sidebar_has_widgets', false, $index ); |
| 1163 | } |
| 1164 | |
| 1165 | /** |
| 1166 | * Fires before widgets are rendered in a dynamic sidebar. |
| 1167 | * |
| 1168 | * Note: The action also fires for empty sidebars, and on both the front-end |
| 1169 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| Line | Code |
| 1273 | * Note: The action also fires for empty sidebars, and on both the front-end |
| 1274 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| 1275 | * |
| 1276 | * @since 3.9.0 |
| 1277 | * |
| 1278 | * @param int|string $index Index, name, or ID of the dynamic sidebar. |
| 1279 | * @param bool $has_widgets Whether the sidebar is populated with widgets. |
| 1280 | * Default true. |
| 1281 | */ |
| 1282 | do_action( 'dynamic_sidebar_after', $index, true ); |
| 1283 | |
| 1284 | /** |
| 1285 | * Filter whether a sidebar has widgets. |
| 1286 | * |
| 1287 | * Note: The filter is also evaluated for empty sidebars, and on both the front-end |
| 1288 | * and back-end, including the Inactive Widgets sidebar on the Widgets screen. |
| 1289 | * |
| 1290 | * @since 3.9.0 |
| 1291 | * |