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
266      /**
267       * Filters the sidebar default arguments.
268       *
269       * @since 5.3.0
270       *
271       * @see register_sidebar()
272       *
273       * @param array $defaults The default sidebar arguments.
274       */
275      $sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) );
276
277      if ( $id_is_empty ) {
278           _doing_it_wrong(
279                __FUNCTION__,
280                sprintf(
281                     /* translators: 1: The 'id' argument, 2: Sidebar name, 3: Recommended 'id' value. */
282                     __( '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.' ),
283                     '<code>id</code>',
284                     $sidebar['name'],