Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43826, comment 9


Ignore:
Timestamp:
11/21/2018 07:17:18 AM (6 years ago)
Author:
tellyworth
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43826, comment 9

    initial v1  
    88
    991. This continues to support gallery blocks that don't contain the json blob, by extracting img srcs from innerHtml. **Should it?**
    10 2. For blocks, `get_post_galleries( ..., false );` should include block attributes in the returned array, in much the same way that it does for shortcodes (see `test_mixed_post_galleries` for details). I've made sure the `ids` in the return array is a string, same as for shortcodes. However it's likely that other values in the json blob won't quite match what would be returned from a shortcode, so code that relies on `get_post_galleries( ..., false )` might be surprised by the results. **What's that going to break?**
     102. For blocks, `get_post_galleries( ..., false );` will now include block attributes in the returned array, in much the same way that it does for shortcodes (see `test_mixed_post_galleries` for details). I've made sure the `ids` in the return array is a string, same as for shortcodes. However it's likely that other values in the json blob won't quite match what would be returned from a shortcode, so code that relies on `get_post_galleries( ..., false )` might be surprised by the results. **What's that going to break?**
    1111
    1212I've really only unit tested this, as I don't have a good understanding of real world use cases for these functions.