You appear to be a bot. Output may be restricted
Description
Implement [api] shortcode to produce simple links to an APIIf there's just one API it's shown as "api()". If more than one then they're comma separated, but NOT in an HTML list "api(), api2()" Links are created to PHP, the local site or the 'preferred' WordPress reference site.
Usage
$string = oikai_api( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – content
- $tag
- ( string ) optional – the shortcode tag
Returns
string generated HTMLSource
File name: oik-shortcodes/shortcodes/oik-api.phpLines:
1 to 24 of 24
function oikai_api( $atts=null, $content=null, $tag=null ) { oiksc_autoload(); $apis = bw_array_get_from( $atts, "api,0", null ); if ( $apis ) { $apia = bw_as_array( $apis ); oik_require( "shortcodes/oik-apilink.php", "oik-shortcodes" ); oik_require( "shortcodes/oik-api-importer.php", "oik-shortcodes" ); $count = 0; foreach ( $apia as $key => $api ) { $api = oikai_simplify_apiname( $api ); if ( $count ) { e( "," ); e( " " ); } $count++; $type = oikai_determine_reference_type( $api ); oikai_handle_reference_type( $api, $type ); } } else { oik_require( "shortcodes/oik-api-status.php", "oik-shortcodes" ); oikai_api_status( $atts ); } return( bw_ret() ); }View on GitHub