You appear to be a bot. Output may be restricted
Description
Create or update an oik_api locally
The API may contain the API name in the format of 'class::api' – representing a method 'api' – representing a function 'class::' – representing a class The value we store in "_oik_api_name" for a method will be in the class::api format API names are normally expected to be unique. This code does not cater for use of namespacing.
Usage
oiksc_local_oiksc_create_api( $plugin, $file, $component_type, $api_object );
Parameters
- $plugin
- ( string ) required – the plugin name
- $file
- ( string ) required –
- $component_type
- ( string ) required –
- $api_object
- ( object ) required –
Returns
void
Source
File name: oik-shortcodes/admin/oik-create-apis.php
Lines:
1 to 24 of 24
function oiksc_local_oiksc_create_api( $plugin, $file, $component_type, $api_object ) { global $plugin_post; $api = $api_object->getApiName(); echo "API: $api " . PHP_EOL . PHP_EOL; if ( $plugin_post ) { //$func = oikai_get_func( $api, null ); $func = $api_object->getMethod(); if ( $func ) { echo "Processing: $func,$api,$file". PHP_EOL; $type = $api_object->getApiType(); $title = $api_object->getShortDescription(); $post_id = _oiksc_create_api( $plugin_post->ID, $api, $file, $type, $title ); oiksc_yoastseo( $post_id, $api, $plugin, $type, $title ); } else { echo "Processing classref: $api,$file" . PHP_EOL; $post_id = oikai_get_classref( $api, null, $plugin_post->ID, $file ); oiksc_yoastseo( $post_id, $api, $plugin, "class" ); } } else { e( "Invalid plugin: $plugin "); } oiksc_reset_globals(); }