[wp-trac] [WordPress Trac] #11456: excerpt_more tweak
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 16 10:45:50 UTC 2009
#11456: excerpt_more tweak
--------------------------+-------------------------------------------------
Reporter: demetris | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.9
Component: Formatting | Version: 2.9
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
I believe this should be considered and accepted or rejected before 2.9
final, that is, before people start using the new EXCERPT_MORE filter.
Currently the MORE that is added to the autogenerated excerpt is:
{{{
{SPACE}[...]
}}}
(EXCERPT_MORE is added to the array with array_push(), and then the array
is imploded with SPACE as a string.)
However, the filterable EXCERPT_MORE is just:
{{{
[...]
}}}
I think the two should be the same.
Here is a case in which the current behaviour is problematic: I want to
replace the default EXCERPT_MORE with a simple ellipsis, expecting to get:
{{{
Blah Blah. This is an excerpt autogenerated by{ELLIPSIS}
}}}
Instead, I get:
{{{
Blah Blah. This is an excerpt autogenerated by{SPACE}{ELLIPSIS}
}}}
To get this space removed, you have to go and apply filtering to a lower
level, which I think defeats the purpose of introducing a user-friendly
EXCERPT_MORE filter. (On the other hand, if folks do want a space there,
there is no easier thing than starting your custom EXCERPT_MORE with a
space.)
I’m attaching a patch — more as a demonstration of what I am after, as I
don’t know what is the proper way to make this change to wp_trim_excerpt.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11456>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list