Widgets: Introduce register_sidebar_defaults
filter for default arguments in register_sidebar()
.
Props patilvikasj, powerbuoy. Fixes #48033. git-svn-id: https://develop.svn.wordpress.org/trunk@46147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
209666d332
commit
f360f879f8
@ -263,7 +263,16 @@ function register_sidebar( $args = array() ) {
|
||||
'after_title' => "</h2>\n",
|
||||
);
|
||||
|
||||
$sidebar = wp_parse_args( $args, $defaults );
|
||||
/**
|
||||
* Filters the sidebar default arguments.
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @see register_sidebar()
|
||||
*
|
||||
* @param array $defaults The default sidebar arguments.
|
||||
*/
|
||||
$sidebar = wp_parse_args( $args, apply_filters( 'register_sidebar_defaults', $defaults ) );
|
||||
|
||||
if ( $id_is_empty ) {
|
||||
_doing_it_wrong(
|
||||
|
Loading…
Reference in New Issue
Block a user