WordPress.org

Make WordPress Core

Changeset 46147


Ignore:
Timestamp:
09/16/2019 09:13:01 AM (2 months ago)
Author:
SergeyBiryukov
Message:

Widgets: Introduce register_sidebar_defaults filter for default arguments in register_sidebar().

Props patilvikasj, powerbuoy.
Fixes #48033.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r46122 r46147  
    264264    );
    265265
    266     $sidebar = wp_parse_args( $args, $defaults );
     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 ) );
    267276
    268277    if ( $id_is_empty ) {
Note: See TracChangeset for help on using the changeset viewer.