You appear to be a bot. Output may be restricted
Description
Paginate an array of post IDsGiven an array of post IDs we need to find the first post to display from the passed page ID for this instance and only display posts from start to end then display the pagination stuff
Usage
bw_navi_ids( $posts, $atts );
Parameters
- $posts
- ( array ) required – array of post IDs
- $atts
- ( arry ) optional – shortcode parameters
Returns
voidSource
File name: oik/shortcodes/oik-navi.phpLines:
1 to 17 of 17
function bw_navi_ids( $posts, $atts=null ) { $bwscid = bw_get_shortcode_id( true ); $page = bw_check_paged_shortcode( $bwscid ); $posts_per_page = get_option( "posts_per_page" ); $count = count( $posts ); $pages = ceil( $count / $posts_per_page ); $start = ( $page-1 ) * $posts_per_page; $end = min( $start + $posts_per_page, $count ) -1; bw_navi_s2eofn( $start, $end, $count ); oik_require( "shortcodes/oik-list.php" ); $ol = bw_sl( $atts, $start ); for ( $i = $start; $i<= $end; $i++ ) { bw_list_id( $posts[$i] ); } bw_el( $ol ); bw_navi_paginate_links( $bwscid, $page, $pages ); }View on GitHub View on Trac