Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#46288 new defect (bug)

'get_extended' breaks when using 'more' gutenberg block

Reported by: joewebber's profile joewebber Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0
Component: Posts, Post Types Keywords: needs-patch
Focuses: Cc:

Description

'get_extended' returns the closing tag <!-- /wp:more -->' in the extended content, which prevents 'the_content' filter from working correctly.

Steps to replicate:

<?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
$post = str_replace('<!-- /wp:more -->', '<!-- /more -->', $post);

Change History (1)

#1 @pento
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 5.0.3 to 5.0

Related: #46471.

Note: See TracTickets for help on using tickets.