WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #53327, comment 6


Ignore:
Timestamp:
06/15/2021 01:11:27 AM (4 months ago)
Author:
noisysocks
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53327, comment 6

    initial v1  
    13134. We could have the widgets screen fire a different hook to `enqueue_block_editor_assets`. For example, `enqueue_widgets_block_editor_assets`. This would fix the problem with Twenty Twenty but has the very unfortunate side effect of requiring that all third party blocks need to enqueue their scripts and styles in both `enqueue_block_editor_assets` and `enqueue_widgets_block_editor_assets`. That is, the widgets editor would not support third party blocks by default.
    1414
    15 5. We could add an "is this the widgets screen?" check to Twenty Twenty's `twentytwenty_block_editor_styles` function which does not add the styles if e.g. `$pagenow === 'widgets.php`. This doesn't solve any of the underlying issues but, of course, is very doable in time for WordPress 5.8.
     155. We could add an "is this the widgets screen?" check to Twenty Twenty's `twentytwenty_block_editor_styles` function which does not add the styles if e.g. `$pagenow === 'widgets.php'`. This doesn't solve any of the underlying issues but, of course, is very doable in time for WordPress 5.8.
    1616
    1717So, in my view, (1) is the proper fix but perhaps not feasible for WordPress 5.8. (3) is a good alternative but perhaps not possible. (5) is potentially the best temporary solution.