[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:51:17 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):
Thanks for the clarification boonebgorges. Since the {{{$more}}} global is
pulled in on [https://github.com/WordPress/WordPress/blob/master/wp-
includes/query.php#L4547 line 4547], I just assumed that this represented
the $more global I'm familiar with in the templates. Are you sure that's
not what's getting modified here?
I have a [https://wordpress.org/plugins/good-reviews-wp/ small reviews
plugin] designed for outputting short review snippets. In the use-cases
I've envisioned for the plugin, reviews tend to be short excerpts taken
from other sites, and so whether the review is displayed in a taxonomy
archive or a widget, I generally want the full review displayed. So the
plugin sets {{{$more = 1}}} and then resets it after the reviews are
printed. With the 4.1 beta, the {{{$more}}} var is now being reset to 0
when {{{$reviews->the_post()}}} is called in the loop.
I do think it's common to manipulate the {{{$more}}} global in this way.
Though I understand this may be considered an inappropriate or abusive use
of the {{{$more}}} global. If so, I'm happy to modify my plugin. I just
wanted some clarity on this before moving forward.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25349#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list