Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #56993


Ignore:
Timestamp:
10/25/2023 10:43:41 PM (16 months ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56993

    • Property Component changed from General to Script Loader
  • Ticket #56993 – Description

    initial v2  
    1 In the wp_enqueue_block_support_styles function, I'm changing the $action_hook_name to header or footer for block theme and classic theme.
    2 In that case, when using php templates in a customized scene with a block theme, the CSS may not be output if it is a header.
     1In the `wp_enqueue_block_support_styles` function, I'm changing the `$action_hook_name` to header or footer for block theme and classic theme.
     2In that case, when using PHP templates in a customized scene with a block theme, the CSS may not be output if it is a header.
    33(If it is a footer, it will be output.)
    44
    5 So I would like to put a filter in the wp_enqueue_block_support_styles function so that $action_hook_name can be changed freely
     5So I would like to put a filter in the `wp_enqueue_block_support_styles` function so that `$action_hook_name` can be changed freely
    66
    77[https://developer.wordpress.org/reference/functions/wp_enqueue_block_support_styles/]