You appear to be a bot. Output may be restricted
Description
Create or update an "oik_file" post_type
Usage
$ID = _oikai_create_file( $plugin, $file );
Parameters
- $plugin
- ( ID ) required –
- $file
- ( string ) required –
Returns
IDSource
File name: oik-shortcodes/admin/oik-files.phpLines:
1 to 34 of 34
function _oikai_create_file( $plugin, $file ) { p( "Creating file: $file" ); bw_flush(); $post = oiksc_get_oik_file_byname( $plugin, $file ); $parent = oiksc_create_ancestry( $post, $plugin, $file ); bw_trace2( $post, "post", true, BW_TRACE_DEBUG ); if ( !$post ) { $post_id = oiksc_create_oik_file( $plugin, $file, $parent ); } else { $post_id = $post->ID; $post->post_parent = $parent; oiksc_update_oik_file( $post, $plugin, $file ); } global $oikai_post_id; $oikai_post_id = $post_id; /** * We need to ensure that the first instance of the function name does not appear as a call to the function. * To achieve this we need to let the pseudo method know that it's part of the class. */ //$class = oikai_get_class( $api ); //p( "Class $class" ); //bw_context( "classname", $class ); //bw_context( "variable", "this" ); // bw_context( "operator", "function" ); //oiksc_build_callees( null, $file, $plugin ); // oikai_save_callees( $post_id ); // oiksc_save_hooks( $post_id ); // oiksc_save_associations( $post_id ); return( $post_id ); }View on GitHub