-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Deprecate wp_enqueue_block_support_styles #4015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2988,6 +2988,7 @@ function wp_enqueue_global_styles_css_custom_properties() { | |||||||
| * | ||||||||
| * @since 5.9.1 | ||||||||
| * @since 6.1.0 Added the `$priority` parameter. | ||||||||
| * @deprecated 6.2.0 Use wp_style_engine_get_stylesheet_from_css_rules() instead. | ||||||||
| * | ||||||||
| * For block themes, styles are loaded in the head. | ||||||||
| * For classic ones, styles are loaded in the body because the wp_head action happens before render_block. | ||||||||
|
|
@@ -2998,6 +2999,7 @@ function wp_enqueue_global_styles_css_custom_properties() { | |||||||
| * @param int $priority To set the priority for the add_action. | ||||||||
| */ | ||||||||
| function wp_enqueue_block_support_styles( $style, $priority = 10 ) { | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function should be moved to |
||||||||
| _deprecated_function( __FUNCTION__, '6.2.0', 'wp_style_engine_get_stylesheet_from_css_rules()' ); | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| $action_hook_name = 'wp_footer'; | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Empty new line to separate the deprecation from the original function's code. |
||||||||
| if ( wp_is_block_theme() ) { | ||||||||
| $action_hook_name = 'wp_head'; | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.