[wp-trac] [WordPress Trac] #61351: Simplify the block bindings HTML replacement logic

WordPress Trac noreply at wordpress.org
Mon Jun 3 15:15:48 UTC 2024


#61351: Simplify the block bindings HTML replacement logic
------------------------------+---------------------
 Reporter:  santosguillamot   |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  6.6
Component:  Editor            |     Version:  6.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+---------------------

Comment (by petitphp):

 == Test Report
 This report validates that the indicated patch addresses the issue.

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/6712

 === Environment
 - OS: macOS 13.6
 - Web Server: nginx/1.25.3
 - PHP: 8.2.18
 - WordPress: 6.6-alpha-57778-src
 - Browser: Firefox 127.0b8
 - Theme: Twenty Twenty-Four
 - Active Plugins: None

 === Actual Results
 - ✅ Paragraph content was successfully replace by the binding in the
 editor and on the frontend.
 - ✅ Heading content was successfully replace by the binding in the editor
 and on the frontend.
 - ✅ Button content was successfully replace by the binding in the editor
 and on the frontend.

 === Additional Notes
 HTML content use to test the patch :
 ```
 <!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"core/post-
 meta","args":{"key":"text_custom_field"}}}}} -->
 <p>Original content</p>
 <!-- /wp:paragraph -->

 <!-- wp:heading {"metadata":{"bindings":{"content":{"source":"core/post-
 meta","args":{"key":"text_custom_field"}}}}} -->
 <h2 class="wp-block-heading">Original content</h2>
 <!-- /wp:heading -->

 <!-- wp:buttons -->
 <div class="wp-block-buttons"><!-- wp:button
 {"metadata":{"bindings":{"text":{"source":"core/post-
 meta","args":{"key":"text_custom_field"}}}}} -->
 <div class="wp-block-button"><a class="wp-block-button__link wp-element-
 button" href="https://wordpress.org/">Original content</a></div>
 <!-- /wp:button --></div>
 <!-- /wp:buttons -->
 ```

 === Supplemental Artifacts
 See attachments

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


More information about the wp-trac mailing list