[wp-trac] Re: [WordPress Trac] #3794: Generate post_title based on
post_content
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 16 09:56:07 GMT 2007
#3794: Generate post_title based on post_content
--------------------------+-------------------------------------------------
Reporter: Justinsomnia | Owner: markjaquith
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.2
Component: General | Version: 2.1
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-------------------------------------------------
Comment (by justinsomnia):
Behavior change indeed, but a pretty vanilla one that I think fills in a
hole of missing functionality. Feed items with missing titles is not a
"specialized case" in my opinion. I just saw your RSS 2.0 quote, a spec
which will surely lead us down a path of ambiguity. Just for fun, you
might be curious to know that the Atom spec sez:
"atom:entry elements MUST contain exactly one atom:title element."
I sympathize with the "I don't want WP generating my titles" perspective,
but I believe that the vast majority of people write their own titles, so
this is really only a behavior change for the minority of us who happen to
not for whatever reason (link blogs, custom CMS). I am curious though,
Otto, what would this break for you?
I'd planned on creating a plugin to accomplish this, but I wanted title
generation to occur in the same way that post slugs do, at the moment the
post is published, and only if the title is blank, and before the
post_name is generated. Based on my cursory understanding of the code, the
only place to accomplish that is exactly where I inserted my
{{{generate_title_from_content()}}} function call in wp-includes/post.php.
I'm not sure whether this same functionality could be accomplished as a
plugin with the present pre_save filters (I didn't think so, but I'm not a
WP filter guru), or if this warrants a new filter hook... All pointers are
welcome.
--
Ticket URL: <http://trac.wordpress.org/ticket/3794#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list