[wp-trac] [WordPress Trac] #56780: shortcode block in block-based template part in a classic theme does not get expanded

WordPress Trac noreply at wordpress.org
Mon Jan 16 23:29:55 UTC 2023


#56780: shortcode block in block-based template part in a classic theme does not
get expanded
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  Future
                                                 |  Release
Component:  Editor                               |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  early has-testing-info has-          |     Focuses:
  screenshots has-patch has-unit-tests           |
-------------------------------------------------+-------------------------

Comment (by ironprogrammer):

 Thanks for the patch, @petitphp! I've expanded the test cases to include
 the other processing [https://github.com/WordPress/wordpress-
 develop/pull/3851/files#diff-
 1d8e05d3ea69557ca8742330e62c1893a72d4ca4ff2ed4ccc5b94bcf5d20fed7 added in
 PR 3851].

 == Test Report
 Patch tested: https://github.com/WordPress/wordpress-develop/pull/3851

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 12.6.2
 - Browser: Safari 16.2
 - Server: nginx/1.23.3
 - PHP: 7.4.33
 - WordPress: 6.2-alpha-54642-src
 - Theme: test-56780 v0.1.0 (same as comment:14 plus changes noted below)

 === Actual Results
 `block_template_part` content is now processed by:
 - ✅ do_shortcode **(original reported issue)**
 - ✅ wptexturize (e.g. processed smart quotes)
 - ✅ convert_smilies
 - ✅ shortcode_unautop
 - ✅
 [https://developer.wordpress.org/reference/functions/wp_filter_content_tags/
 wp_filter_content_tags] (added `decoding="async" loading="lazy"`
 attributes to `<img>` tag)
 - ✅ $wp_embed->autoembed

 === Additional Notes
 - In the test theme, I replaced `masthead.html` with
 [https://gist.github.com/ironprogrammer/0fb4e5084968b84977fa813bcfde771c
 the content of this gist] to incorporate the additional markup processing.

 === Supplemental Artifacts
 ||= Before Patch =||= After Patch =||
 || [[Image(https://cldup.com/OJ3-r45Gk4.png)]] ||
 [[Image(https://cldup.com/rSvlzt4B9V.png)]] ||

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


More information about the wp-trac mailing list