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 |
---|---|
291 | /** |
292 | * Filters the sidebar default arguments. |
293 | * |
294 | * @since 5.3.0 |
295 | * |
296 | * @see register_sidebar() |
297 | * |
298 | * @param array $defaults The default sidebar arguments. |
299 | */ |
300 | $sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) ); |
301 |
|
302 | if ( $id_is_empty ) { |
303 | _doing_it_wrong( |
304 | __FUNCTION__, |
305 | sprintf( |
306 | /* translators: 1: The 'id' argument, 2: Sidebar name, 3: Recommended 'id' value. */ |
307 | __( '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.' ), |
308 | '<code>id</code>', |
309 | $sidebar['name'], |