Opened 4 years ago
Closed 4 years ago
#54367 closed defect (bug) (duplicate)
Remove closure hooked to `render_block` within `enqueue_block_styles_assets()`
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 5.8.1 |
| Component: | Script Loader | Keywords: | |
| Focuses: | Cc: |
Change History (4)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
4 years ago
Replying to jrf:
If it helps, I can do a scan of the complete
srcto check if any others may have slipped in.
Yes, please! As noted in comment:8:ticket:54323, there are at least two other instances added in [51902].
#3
in reply to:
↑ 2
@
4 years ago
Replying to SergeyBiryukov:
Replying to jrf:
If it helps, I can do a scan of the complete
srcto check if any others may have slipped in.
Yes, please! As noted in comment:8:ticket:54323, there are at least two other instances added in [51902].
Here you go (scanned with a draft/unfinished sniff I have locally, but which isn't in WPCS yet):
FILE: src\wp-admin\edit-form-blocks.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
34 | ERROR | Using a closure as the callback for add_filter() is forbidden as
| | unhooking it is nearly impossible (at this time - see trac ticket
| | 46635)
--------------------------------------------------------------------------------
FILE: src\wp-admin\includes\class-wp-upgrader.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
854 | ERROR | Using a closure as the callback for add_action() is forbidden
| | as unhooking it is nearly impossible (at this time - see trac
| | ticket 46635)
876 | ERROR | Using a closure as the callback for add_action() is forbidden
| | as unhooking it is nearly impossible (at this time - see trac
| | ticket 46635)
1135 | ERROR | Using a closure as the callback for add_action() is forbidden
| | as unhooking it is nearly impossible (at this time - see trac
| | ticket 46635)
--------------------------------------------------------------------------------
FILE: src\wp-admin\options-privacy.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
23 | ERROR | Using a closure as the callback for add_filter() is forbidden as
| | unhooking it is nearly impossible (at this time - see trac ticket
| | 46635)
--------------------------------------------------------------------------------
FILE: src\wp-admin\privacy-policy-guide.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
22 | ERROR | Using a closure as the callback for add_filter() is forbidden as
| | unhooking it is nearly impossible (at this time - see trac ticket
| | 46635)
--------------------------------------------------------------------------------
FILE: src\wp-includes\script-loader.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
2469 | ERROR | Using a closure as the callback for add_filter() is forbidden
| | as unhooking it is nearly impossible (at this time - see trac
| | ticket 46635)
--------------------------------------------------------------------------------
FILE: src\wp-includes\sitemaps\class-wp-sitemaps-renderer.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
256 | ERROR | Using a closure as the callback for add_filter() is forbidden as
| | unhooking it is nearly impossible (at this time - see trac
| | ticket 46635)
--------------------------------------------------------------------------------
Note: See
TracTickets for help on using
tickets.
If it helps, I can do a scan of the complete
srcto check if any others may have slipped in.