[Bb-trac] [bbPress] #878: function get_page_number_links should
have optional $per_page setting
bbPress
bb-trac at lists.bbpress.org
Wed May 7 21:41:12 GMT 2008
#878: function get_page_number_links should have optional $per_page setting
-------------------------+--------------------------------------------------
Reporter: _ck_ | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: 1.0-beta & XML-RPC
Component: Back-end | Version:
Severity: minor | Keywords:
-------------------------+--------------------------------------------------
The pagination function in bbPress is quite decent. However it's silly to
hook bb_get_option_page_topics when a plugin simply wants to take
advantage of the pagination on special pages. Why not allow a $per_page
setting to be optionally passed, if not there then fall back to the
bb_get_option?
ie.
{{{
function get_page_number_links($page, $total, $per_page=''){
if (empty($per_page)) {$per_page=bb_get_option('page_topics');}
}}}
Currently the only way to work around this is to add `add_action(
'bb_get_option_page_topics', 'per_page_workaround');` before calling the
navigation function and returning the desired custom value.
--
Ticket URL: <http://trac.bbpress.org/ticket/878>
bbPress <http://bbpress.org/>
Innovative forum development
More information about the Bb-trac
mailing list