[wp-trac] [WordPress Trac] #55175: Widgets: Allow filtering args in `the_widget`

WordPress Trac noreply at wordpress.org
Wed Feb 16 05:10:26 UTC 2022

#55175: Widgets: Allow filtering args in `the_widget`
 Reporter:  noisysocks   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Future Release
Component:  Widgets      |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
 Originally reported in


 ### Description

 currently it's not possible to change widgets `before_title` from `<h2>`
 to `<h4>` when you use new gutenberg widgets environment and legacy
 widgets like `nav_menu`
 it's calling `the_widget` with `$arg` without any `apply_filter` in `wp-

 ### Step-by-step reproduction instructions

 1. Go to `/wp-admin/widgets.php`
 2. add Legacy Widget - Navigation Menu
 3. Enter some title
 3. On frontend it will be rendered as `<h2>` but there is no way how to
 change it to something else, like `<h4>` - no hook

 ### Screenshots, screen recording, code snippet

 _No response_

 ### Environment info

 _No response_

 ### Please confirm that you have searched existing issues in the repo.


 ### Please confirm that you have tested with all plugins deactivated
 except Gutenberg.


Ticket URL: <https://core.trac.wordpress.org/ticket/55175>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list