You appear to be a bot. Output may be restricted
Description
Implement "wp_ajax_oiksc_create_file" action for oik-shortcodesCreate or update an "oik_file" post AND parse all the classes, methods and APIs implemented, including the main file, using logic similar to createapi2.php
Usage
oiksc_ajax_oiksc_create_file();
Parameters
Returns
voidSource
File name: oik-shortcodes/oik-shortcodes.phpLines:
1 to 42 of 42
function oiksc_ajax_oiksc_create_file() { do_action( "oik_loaded" ); oiksc_autoload(); // User still has to be authorised to perform the request! // So how do we check this? //oiksc_create_api(); global $plugin_post, $plugin; $file = bw_array_get( $_REQUEST, "file", null ); $plugin = bw_array_get( $_REQUEST, "plugin", null ); if ( $file ) { oik_require( "includes/bw_posts.php" ); oik_require( "admin/oik-apis.php", "oik-shortcodes" ); oik_require( "admin/oik-files.php", "oik-shortcodes" ); //oik_require( "admin/oik-shortcodes.php", "oik-shortcodes" ); oik_require( "feed/oik-plugins-feed.php", "oik-plugins" ); oik_require( "shortcodes/oik-api-importer.php", "oik-shortcodes" ); if ( is_null( $plugin )) { $plugin = 'wordpress'; //$file = ABSPATH . $file; //$file = str_replace( "\\", "/", $file ); bw_trace2( $file, "file" ); } // $plugin_post = oikp_load_plugin( $plugin ); $component_type = oiksc_query_component_type( $plugin ); $plugin_post = oiksc_load_component( $plugin, $component_type ); if ( $plugin_post ) { $file_id = _oikai_create_file( $plugin_post->ID, $file ); $filename = oik_pathw( $file, $plugin, $component_type ); $parsed_source = oiksc_display_oik_file( $filename, $component_type, $file_id, true ); } else { e( "Invalid component: $plugin, type: $component_type "); } } else { bw_trace2(); e( "missing stuff :$file:$plugin:" ); } bw_flush(); exit(); }View on GitHub