[wp-trac] [WordPress Trac] #11307: Better handling of posts without titles in Bulk Edit
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 2 18:02:23 UTC 2009
#11307: Better handling of posts without titles in Bulk Edit
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: 3.0
Component: Quick Edit | Version: 2.9
Severity: minor | Keywords: has-patch
--------------------------+-------------------------------------------------
Start a Bulk Edit that includes a post with a single space for a title
(which is shown as "(no title)"), and the Bulk Edit title won't display it
as "(no title)".
That's because the title on the Edit screen is run through
_draft_or_post_title, which checks get_the_title, running those filters
(including trim).
On the other hand, the title in inline post data is simply
$post->post_title. Patch attached to instead use get_the_title.
Patch doesn't use _draft_or_post_title() because that would add "(no
title)" to a Quick Edit of a post without a title.
For reference, it's not as edge of a case as you might think. Somehow, a
line break made its way into the title field, so the title looked empty,
and get_the_title evaluated it to empty, but $post->post_title didn't echo
it as empty.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11307>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list