I've edited a quiz plugin to get the report content added as a post. The problem is that when it's added, some of the content necessary to achieve what I'm after gets stripped out.
I'm trying to do a tabbed layout instead of paginated - using:
<ul class="uk-tabs" data-uk-tabs="{content:'#report_content'}">... </ul>
but the
data-uk-tabs="{content:'#report_content'}"
is getting stripped out.
Here's the wp_insert_post() code I'm using (the stripped content is within $output):
wp_insert_post( array(
'post_title' => $exam->name.' Report',
'post_type' => 'my-reports',
'post_name' => $taking_id,
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_content' => $output,
'post_status' => 'private',
'post_author' => $user_id,
'menu_order' => 0,
'comment_status' => 'open',
'post_category' => array(43),
'page_template' => 'single-my-reports.php'
));
I've done a quick test by commenting out
//$postarr = sanitize_post($postarr, 'db');
in post.php, but if there's a safer way by just making an exception for "{connect:'#somediv','param':'xyz...} I'd prefer to go that route.
Or can I disable sanitize just for the post insert above by removing and then re-adding it?
Thanks,
Scott