You appear to be a bot. Output may be restricted
Description
Build the callees for this API
Usage
oiksc_build_callees( $api, $file, $plugin, $post_id, $echo );
Parameters
- $api
- ( string ) required – the API name
- $file
- ( string ) required – the source file for this API
- $plugin
- ( ID ) required – the plugin/theme ID for this API
- $post_id
- ( ID ) required – the post ID for this API
- $echo
- ( bool ) optional default: 1 – true if we want the output echoed
Returns
voidTO DO
The action hooks that are added should only be added once per process. Rather than using a static, the code should be moved to somewhere elseSource
File name: oik-shortcodes/admin/oik-apis.phpLines:
1 to 18 of 18
function oiksc_build_callees( $api, $file, $plugin, $post_id, $echo=true ) { //bw_trace2(); static $added_actions = false; if ( !$added_actions ) { add_action( "oikai_handle_token_T_STRING", "oikai_add_callee" ); add_action( "oikai_record_association", "oikai_record_association", 10, 2 ); add_action( "oikai_record_hook", "oikai_record_hook", 10, 3 ); $added_actions = true; } //add_action( "oikai_handle_token_T_ENCAPSED_STRING", "oikai_add_hook" ); $slug = get_post_meta( $plugin, "_oikp_slug", true ); if ( !$slug ) { $slug = get_post_meta( $plugin, "_oikth_slug", true ); } oik_require( "shortcodes/oik-api-importer.php", "oik-shortcodes" ); oikai_build_apiref( $api, $file, $slug, null, $post_id, $echo, $plugin ); }View on GitHub