#15516 closed enhancement (wontfix)
Candidates for new template functions based on code in Twenty Ten
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Template | Keywords: | needs-patch |
Focuses: | Cc: |
Description
There are several pieces of code in Twenty Ten which are candidates for abstraction into template functions. I'll make a list shortly and put it up here to get feedback.
Change History (6)
#2
@
14 years ago
In loop.php we have:
if ( $wp_query->max_num_pages > 1 )
It's not nice using the $wp_query object directly so let's put it in a function. posts_paged()
would keep it consistent with comments_paged()
suggested above.
if ( posts_paged() )
Much nicer.
#3
@
14 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
Been thinking about a replacement for max_mum_pages for a while. Unfortunately, we use 'paged' in the context of page > 2, not total pages > 2. Would be interested to make new functions though.
#4
@
14 years ago
Maybe use the term 'paginated' instead of 'paged' then? Giving us comments_paginated()
and posts_paginated()
. Might need thinking about.
Note: See
TracTickets for help on using
tickets.
First up in comments.php we have:
This is used twice and would be ideal as a function named
comments_paged()
instead, giving us: