mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user