You appear to be a bot. Output may be restricted
Description
Build some dynamic documentation from the embedded contentWith a bit of luck and a following wind, as Kieran O'Shea once put it…
Usage
oikai_build_dynamic_docs( $content );
Parameters
- $content
- ( string ) required – some PHP source to dynamically format
Returns
voidTO DO
Determine how much of this pre-processing is still neededSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 19 of 19
function oikai_build_dynamic_docs( $content ) { $ent = ncr2ent( $content ); $dec = htmlspecialchars_decode( $ent ); $dec = str_replace( "‘", "'", $dec ); $dec = str_replace( "’", "'", $dec ); $dec = str_replace( "“", '"', $dec ); $dec = str_replace( "”", '"', $dec ); // Can we get away with not doing this if we now run autop after? //$dec = str_replace( "<br />", "", $dec ); //$dec = str_replace( "<p>", "", $dec ); //$dec = str_replace( "</p>", "", $dec ); $parseme = "<?php "; $parseme .= $dec; $startline = 1; bw_trace2( $parseme, "parseme", true, BW_TRACE_DEBUG ); $tokens = token_get_all( $parseme ); bw_trace2( $tokens, "tokens", false, BW_TRACE_DEBUG ); oikai_easy_tokens( $tokens, $startline, true ); }View on GitHub