[wp-trac] [WordPress Trac] #59778: remove not needed function call in wp_post_preview_js

WordPress Trac noreply at wordpress.org
Thu Nov 2 16:30:17 UTC 2023


#59778: remove not needed function call in wp_post_preview_js
-----------------------------+------------------------------
 Reporter:  pbearne          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Script Loader    |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:  javascript
-----------------------------+------------------------------
Changes (by westonruter):

 * keywords:  has-patch => has-patch close


Comment:

 The `<script>` tag is needed for the sake of IDEs to do static analysis at
 development time. Since this JavaScript code is not run through any
 linters at build time, having every bit of development support at code
 time is important. The removal of
 `wp_remove_surrounding_empty_script_tags()` should only happen once the
 `<script>` wrappers aren't needed anymore, which would be done as part of
 #59444. Once the minimum version of PHP is bumped to 7.3, then HEREDOC
 strings can be used instead of the `<script>` wrappers and
 `wp_remove_surrounding_empty_script_tags()` can be removed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59778#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list