[wp-trac] [WordPress Trac] #21002: Feature request: wp_link_pages() needs support for formatting the current page
WordPress Trac
noreply at wordpress.org
Fri Jan 18 02:27:19 UTC 2013
#21002: Feature request: wp_link_pages() needs support for formatting the current
page
-----------------------------+------------------------------
Reporter: archon810 | Owner:
Type: feature request | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+------------------------------
Changes (by toscho):
* cc: info@… (added)
Comment:
In my themes I do not just use a special class, I replace the link with an
unlinked number, because a link to the current page is useless here. For
backwards compatibility I recommend an empty `a` element that could be set
per parameter:
{{{
$defaults = array(
'current_page_element' => 'a', /* more parameters */
);
…
if ( $i === $page )
$output .= '<' . $r['current_page_element']
. ' title="' . __( 'You are here. ' ) . '">' . $i
. '</' . $r['current_page_element'] . '>';
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21002#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list