[wp-trac] [WordPress Trac] #46288: 'get_extended' breaks when using 'more' gutenberg block

WordPress Trac noreply at wordpress.org
Wed Feb 20 10:21:14 UTC 2019


#46288: 'get_extended' breaks when using 'more' gutenberg block
-------------------------------+-----------------------------
 Reporter:  joewebber          |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  5.0.3
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 'get_extended' returns the closing tag <!-- /wp:more -->' in the extended
 content, which prevents 'the_content' filter from working correctly.

 Steps to replicate:

 {{{#!php
 <?php
 // Fetch post content
 $content = get_post_field('post_content', get_the_ID());

 // Get content parts
 $content_parts = get_extended($content);

 echo apply_filters('the_content', $content_parts['extended']);
 }}}

 Quick workaround (wp-includes/post.php line: 592):

 {{{#!php
 <?php
 $post = str_replace('<!-- /wp:more -->', '<!-- /more -->', $post);
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46288>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list