Description
Programmatically create an oik_class record for a selected plugin's methodWe don't set any content. This is automatically generated during 'the_content' filter processing.
Usage
$ID = oikai_create_oik_class( $class, $plugin, $file );Parameters
- $class
- ( string ) required – the class name
- $plugin
- ( ID ) required – the ID of the plugin for which this oik_class is being created
- $file
- ( string ) required – the implementing file
Returns
ID the post ID of the newly created oik_class recordSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 20 of 20
function oikai_create_oik_class( $class, $plugin, $file ) { //bw_backtrace(); $post_title = oikai_oik_class_post_title( $class ); $post = array( 'post_type' => 'oik_class' , 'post_title' => $post_title , 'post_name' => $class , 'post_content' => "<!--more -->" , 'post_status' => 'publish' ); $post['post_parent'] = oikai_oik_class_parent( $class, $plugin, $file ); /* Set metadata fields */ $_POST['_oik_class_name'] = $class; $_POST['_oik_api_plugin'] = $plugin; $_POST['_oik_api_source'] = $file; oik_require( "admin/oik-files.php", "oik-shortcodes" ); $_POST['_oik_fileref'] = oiksc_get_oik_fileref( $plugin, $file ); $post_id = wp_insert_post( $post, TRUE ); bw_trace2( $post_id, "post_id", true, BW_TRACE_DEBUG ); return( $post_id ); }View on GitHub
Called by
1 to 1 of 1
Invoked by
Calls
1 to 4 of 4
