You appear to be a bot. Output may be restricted
Description
List the source of a function using paginationGood programming style suggests functions should be less than 200 lines long. Some WordPress code extends to over 1,000 lines. This takes a long time to parse and markup with links So until we have a cacheing system in place we'll use source code pagination We assume that the PHP token get all function will not have a problem parsing source code that's been randomly chunked. It's probably a very bad assumption.
Usage
oikai_navi_source( $sources );
Parameters
- $sources
- ( array ) required – array of source lines to paginate
Returns
voidSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 22 of 22
function oikai_navi_source( $sources ) { oik_require( "shortcodes/oik-navi.php" ); $bwscid = bw_get_shortcode_id( true ); $page = bw_check_paged_shortcode( $bwscid ); $posts_per_page = 100; // get_option( "posts_per_page" ); $count = count( $sources ); $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, bw_translate( "Lines: " ) ); for ( $i = $start; $i<= $end; $i++ ) { $selection[] = $sources[$i]; } bw_trace2( "prepush" ); //gob(); //bw_push(); oikai_syntax_source( $selection, 1 ); //$parsed = bw_ret(); //bw_pop(); //e( $parsed ); bw_navi_paginate_links( $bwscid, $page, $pages ); }View on GitHub