[wp-trac] [WordPress Trac] #25349: Can't retrieve calculated excerpt bound by <!--more--> on single page view

WordPress Trac noreply at wordpress.org
Mon Nov 17 15:17:50 UTC 2014


#25349: Can't retrieve calculated excerpt bound by <!--more--> on single page view
-------------------------------------+-----------------------------
 Reporter:  chriscoyier              |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Posts, Post Types        |     Version:  3.6.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  template
-------------------------------------+-----------------------------

Comment (by NateWr):

 This change caused a problem with one of my plugins. While diagnosing
 this, I found a discrepancy I thought I would raise. The comment for
 [https://github.com/WordPress/WordPress/blob/master/wp-
 includes/query.php#L4561-L4569 lines 4561-4569] suggests the else
 statement should "respect" the $more global. But it actually sets it to 0
 (potentially overriding it if the global has been modified elsewhere).


 {{{
                 // Force full post content when viewing the permalink for
 the $post, or
                 // when on an RSS feed. Otherwise respect the 'more' tag.
                 if ( $post->ID === get_queried_object_id() && (
 $this->is_page() || $this->is_single() ) ) {
                         $more = 1;
                 } else if ( $this->is_feed() ) {
                         $more = 1;
                 } else {
                         $more = 0;
                 }
 }}}


 Is this the intended result? Prior to this commit, the function would
 [https://github.com/WordPress/WordPress/commit/d7a62c01c4f3dd4df2a4cf73bb31ca37f146fbfd
 #diff-8e20e94124dba46643814ef699330737L4646 leave the $more tag alone].

 I appreciate the purpose of the commit was to be more forceful with the
 $more tag. But before I update my plugin, I wanted to check to make sure
 this was the intended behaviour. Should the $more global always be set
 back to 0 if it doesn't match these conditions?

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


More information about the wp-trac mailing list