[wp-trac] [WordPress Trac] #12370: We need a smarter version of wp_title() and a few other template tags
WordPress Trac
wp-trac at lists.automattic.com
Tue May 4 08:51:05 UTC 2010
#12370: We need a smarter version of wp_title() and a few other template tags
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: hallsofmontezuma
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0
Component: Template | Version: 3.0
Severity: major | Keywords: needs-patch blocker
--------------------------+-------------------------------------------------
Comment(by sirzooro):
Few comments:[[BR]]
- I like the new `pre_wp_title` filter and new syntax `<title><?php
wp_title(); ?>` - it allows plugins like Meta SEO Pack to completely
takeover title generation;[[BR]]
- as I mentioned earlier in #10643, plugin needs to know if this new
syntax is used or not, in order to choose between old approach for title
rewriting (use output buffering) and the new one; therefore templates
which supports it should include call like `add_theme_support( 'html-
title-filter' );`;[[BR]]
- current version probably does not take into account custom post types -
it only uses `elseif ( is_single() || is_page() )`; this is true for
attachments too;[[BR]]
- there is a typo on line 667 - is `$paged`, should be `$page`;[[BR]]
- current approach does not address all cases where content can be paged.
There are three cases, which needs to be handled differently: archive
pages (category, author, date, ...), multi-page posts (which use the `<!--
nextpage-->` tag) and paginated comments;[[BR]]
- if it is quite easy to implement, I would like to see in title "Page 2
of 5" instead of just "Page 2". This probably needs new function, which
will return total page count in all three cases listed above, or new
function for each case.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12370#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list