Description
Update an "oik_file" post typeSetting the post_name is required to update existing posts
Usage
$ID = oiksc_update_oik_file( $post, $plugin, $file );Parameters
- $post
- ( object ) required – the oik_file post object
- $plugin
- ( ID ) required – the plugin ID
- $file
- ( string ) required – the file name
Returns
IDSource
File name: oik-shortcodes/admin/oik-files.phpLines:
1 to 10 of 10
function oiksc_update_oik_file( $post, $plugin, $file ) { $post->post_title = oiksc_oik_file_post_title( $file ); $post->post_name = oiksc_get_oik_file_post_name( $file ); /* Set metadata fields */ $_POST['_oik_file_name'] = $file; $_POST['_oik_api_plugin'] = $plugin; bw_trace2( null, null, true, BW_TRACE_DEBUG ); //$_POST['_oik_file_passes'] = ; // Apply this update separately wp_update_post( $post ); }View on GitHub
Invoked by
Calls
1 to 3 of 3
