You appear to be a bot. Output may be restricted
Description
Return the required page if this is the shortcode we're processingCalled if this shortcode has a "posts_per_page" parameter Note: Currently this simply calls bw_get_parm_shortcode_id() In the future we may deal with different forms of paging. e.g. by starting letter, date We make a number of assumptions:
- The result set doesn't change between loadings of the page.
- As the visitor clicks on different links within the page a new/updated &bwscidnnn= is appended to the query URL
- Each paginated shortcode starts from page=1
- $bwscid
- ( integer ) required – the shortcode ID
Usage
$integer = bw_check_paged_shortcode( $bwscid );
Parameters
Returns
integer required pageSource
File name: oik/shortcodes/oik-navi.phpLines:
1 to 14 of 14
function bw_check_paged_shortcode( $bwscid ) { $page = bw_get_parm_shortcode_id( $bwscid ); /* Some requests from bots contain trailing slashes either as '/' or '%2F' The paged value needs to be numeric. */ $page = trim( $page,'/' ); $page = (int) $page; /* Cater for a non numeric value for page. */ if ( !$page ) { $page = 1; } return $page; }View on GitHub View on Trac