Widgets: Add support for the Widgets Editor on after_setup_theme instead of widgets_init.
This better aligns with developer expectations, as `add_theme_support()` and `remove_theme_support()` are meant to be called within functions attached to the `after_setup_theme` hook. This also adds the `widgets-block-editor` feature to the docblock for `add_theme_support()`. Props kevin940726, caseymilne, jamesros161, noisysocks, Mamaduka, audrasjb, zieladam, hellofromTonya, desrosj. Fixes #53424. Built from https://develop.svn.wordpress.org/trunk@51214 git-svn-id: http://core.svn.wordpress.org/trunk@50823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2479,6 +2479,7 @@ function get_theme_starter_content() {
|
||||
* @since 5.5.0 The `core-block-patterns` feature was added and is enabled by default.
|
||||
* @since 5.5.0 The `custom-logo` feature now also accepts 'unlink-homepage-logo'.
|
||||
* @since 5.6.0 The `post-formats` feature warns if no array is passed.
|
||||
* @since 5.8.0 The `widgets-block-editor` enables the Widgets block editor.
|
||||
*
|
||||
* @global array $_wp_theme_features
|
||||
*
|
||||
@@ -2511,6 +2512,7 @@ function get_theme_starter_content() {
|
||||
* - 'title-tag'
|
||||
* - 'wp-block-styles'
|
||||
* - 'widgets'
|
||||
* - 'widgets-block-editor'
|
||||
* @param mixed ...$args Optional extra arguments to pass along with certain features.
|
||||
* @return void|false Void on success, false on failure.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user