Description
Implement [apis] shortcode – links to a list of APIsExamples: [apis api=functionname] [apis func=functionname] – not yet implemented!
alternatively [apis bbboing_sc fiddle] will return the values in $atts[0] and $atts[1] so we can get the API names from there!
How about? [apis "bbboing_sc fiddle" ]
Usage
$string = oikai_apilink( $atts, $content, $tag );Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not expected
- $tag
- ( string ) optional – shortcode tag
Returns
string the generated HTMLSource
File name: oik-shortcodes/shortcodes/oik-apilink.phpLines:
1 to 16 of 16
function oikai_apilink( $atts=null, $content=null, $tag=null ) { $function = bw_array_get( $atts, "api", null ); $functions = bw_as_array( $function ); $unkeyed = bw_array_get_unkeyed( $atts ); $functions = array_merge( $functions, $unkeyed ); bw_trace2( $functions, "functions" ); $class = bw_array_get( $atts, "class", "bw_api" ); if ( count( $functions) ) { oikai_list_apis_byname( $functions, $atts ); } else { oikai_listapis( $atts ); } return( bw_ret()); }View on GitHub
Called by
Invoked by
Calls
1 to 6 of 6
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_as_array() – Split a string into an array if necessary
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oikai_listapis() – Automagically determine the API list
- oikai_list_apis_byname() – Produce a list of APIs as links
