You appear to be a bot. Output may be restricted
Description
Programmatically create an oik_file record for a selected plugin's file
Note: We don't allow comments on files.
Usage
$ID = oiksc_create_oik_file( $plugin, $file, $parent );
Parameters
- $plugin
- ( ID ) required – the ID of the plugin for which this file is being created
- $file
- ( string ) required – the implementing filename within the plugin e.g. "oik/shortcodes/oik-codes.php"
- $parent
- ( mixed ) required –
Returns
ID the post ID of the newly created oik_api record
Source
File name: oik-shortcodes/admin/oik-files.php
Lines:
1 to 25 of 25
function oiksc_create_oik_file( $plugin, $file, $parent ) { //bw_backtrace(); $post_title = oiksc_oik_file_post_title( $file ); $post = array( 'post_type' => 'oik_file' , 'post_title' => $post_title , 'post_name' => oiksc_get_oik_file_post_name( $file ) , 'post_content' => "<!--more -->[file][bw_fields]" , 'post_status' => 'publish' , 'comment_status' => 'closed' , 'post_parent' => $parent ); /* Set metadata fields */ //oik_require( "shortcodes/oik-api-importer.php", "oik-shortcodes" ); $_POST['_oik_file_name'] = $file; $_POST['_oik_api_plugin'] = $plugin; //$_POST['_oik_file_passes'] = 0; // We've created the file but not yet parsed it. So passes = 0; $_POST['_oik_file_deprecated_cb'] = false; /* We don't know these values yet: _oik_api_calls _oik_api_hooks */ $post_id = wp_insert_post( $post, TRUE ); bw_trace2( $post_id, "post_id", true, BW_TRACE_DEBUG ); return( $post_id ); }