Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: register_sidebar_defaults

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
277      /**
278       * Filters the sidebar default arguments.
279       *
280       * @since 5.3.0
281       *
282       * @see register_sidebar()
283       *
284       * @param array $defaults The default sidebar arguments.
285       */
286      $sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) );
287
288      if ( $id_is_empty ) {
289           _doing_it_wrong(
290                __FUNCTION__,
291                sprintf(
292                     /* translators: 1: The 'id' argument, 2: Sidebar name, 3: Recommended 'id' value. */
293                     __( '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.' ),
294                     '<code>id</code>',
295                     $sidebar['name'],