You appear to be a bot. Output may be restricted
Description
Create the parsed objectWhen we create the object for the first time we don't set the _oik_parse_count since we need to perform two parses of the component in order to complete the call tree
Usage
$ID = bw_create_parsed_object( $source_post, $content );
Parameters
- $source_post
- ( ID ) required – the source post ID
- $content
- ( string ) required – the parsed content
Returns
ID post ID of the created objectSource
File name: oik-shortcodes/classes/class-oiksc-parsed-source.phpLines:
1 to 23 of 23
function bw_create_parsed_object( $source_post, $content ) { $post = array(); $post['post_type'] = "oik_parsed_source"; $post['post_title'] = "Parsed: $source_post"; //$post['post_name'] = $source_post->post_name; $post['post_content'] = $content; $post['post_status'] = "publish"; $post['comment_status'] = "closed"; /* Set metadata fields */ $_POST['_oik_sourceref'] = $source_post; $_POST['_oik_parse_count'] = 1; $_POST['_oik_md5_hash'] = 0; // We don't know the values for these since we got the information too late //bw_register_field_for_object_type( "_oik_parsed_lines", $post_type ); //bw_register_field_for_object_type( "_oik_parsed_tokens", $post_type ); //bw_register_field_for_object_type( "_oik_parsed_bytes", $post_type ); $post_id = wp_insert_post( $post, TRUE ); bw_trace2( $post_id, "post_id", true, BW_TRACE_VERBOSE ); return( $post_id ); }View on GitHub