You appear to be a bot. Output may be restricted
Description
Respond to the submit button by creating an oik_apiProcessing of the submit button depends on which fields are set Get the plugin, file and API name <pre> plugin file API processing
- list the plugins
- y – – list the files for the plugin
- y y – list the APIs for the selected file
- y y y create the API
Usage
oiksc_create_api();
Parameters
Returns
voidSource
File name: oik-shortcodes/admin/oik-apis.phpLines:
1 to 31 of 31
function oiksc_create_api() { $create = bw_array_get( $_REQUEST, "_oiksc_create_api", null ); oiksc_autoload(); if ( $create ) { // $plugins = _oiksc_get_plugins(); $plugin_id = _oiksc_get_plugin(); $files = _oiksc_get_files( $plugin_id ); array_unshift( $files, 0 ); $file = _oiksc_get_file( $files ); //$apis = _oiksc_get_apis( $files[$file] ); $api = _oiksc_get_api(); $type = _oiksc_get_type(); // $code = _oiksc_get_shortcode(); **?** if ( $type && $api && $file && $plugin_id ) { oik_require( "includes/bw_posts.php" ); $post_id = _oiksc_create_api( $plugin_id, $api, $files[$file], $type ); // Note: No $title //$content = bw_ret(); //oik_require( "classes/class-oiksc-parsed-source.php", "oik-shortcodes" ); //$plugin_slug = get_post_meta( $plugin_id, "_oikp_slug", true ); // $component_type = oiksc_query_component_type( $plugin_slug ); // global $plugin; // $plugin = $plugin_slug; // bw_update_parsed_source( $post_id, $content, oiksc_real_file( $files[$file], $component_type) ); // echo $content; oiksc_report( $post_id, "API", "creation" ); } } }View on GitHub