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.
Line | Code |
---|---|
281 | /** |
282 | * Filters the sidebar default arguments. |
283 | * |
284 | * @since 5.3.0 |
285 | * |
286 | * @see register_sidebar() |
287 | * |
288 | * @param array $defaults The default sidebar arguments. |
289 | */ |
290 | $sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) ); |
291 |
|
292 | if ( $id_is_empty ) { |
293 | _doing_it_wrong( |
294 | __FUNCTION__, |
295 | sprintf( |
296 | /* translators: 1: The 'id' argument, 2: Sidebar name, 3: Recommended 'id' value. */ |
297 | __( 'No %1$s was set in the arguments array for the "%2$s" sidebar. Defaulting to "%3$s". Manually set the %1$s to "%3$s" to silence this notice and keep existing sidebar content.' ), |
298 | '<code>id</code>', |
299 | $sidebar['name'], |