mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Widgets: Introduce register_sidebar_defaults
filter for default arguments in register_sidebar()
.
Props patilvikasj, powerbuoy. Fixes #48033. Built from https://develop.svn.wordpress.org/trunk@46147 git-svn-id: http://core.svn.wordpress.org/trunk@45959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3f1d530f4
commit
1060f7e167
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-46146';
|
||||
$wp_version = '5.3-alpha-46147';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -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…
x
Reference in New Issue
Block a user