[wp-trac] [WordPress Trac] #46133: Parse blocks to generate the excerpt

WordPress Trac noreply at wordpress.org
Wed Apr 24 04:18:16 UTC 2019


#46133: Parse blocks to generate the excerpt
--------------------------------------+-----------------------
 Reporter:  gziolo                    |       Owner:  pento
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.2
Component:  Formatting                |     Version:  5.0
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------

Comment (by azaozz):

 In 46133.3.diff:
 - Add a (non-filterable) `$allowed_inner_blocks` list. Same as the default
 `$allowed_blocks` except `core/columns`.
 - When rendering the allowed blocks, exclude blocks that have non-
 whitelisted or nested inner blocks.
 - Add a helper function to render whitelisted blocks from inside the
 columns block.
 - Fix the tests to match the output from get_the_excerpt() (has some
 "unusual" left over white space).

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


More information about the wp-trac mailing list