How to put the variable $get_value in the array, wp_insert_post?
if ($get_value) {
$get_value = "'post_content' => $postpost->post_content,
'post_excerpt' => $postpost->post_excerpt,
'post_name' => $postpost->post_name,
'post_title' => $postpost->post_title,";
} else {
$get_value = '';
}
$args = array(
'comment_status' => $postpost->comment_status,
'ping_status' => $postpost->ping_status,
$get_value,
'post_parent' => $postpost->post_parent,
'post_passworks' => $postpost->post_password,
'post_status' => 'publish',
'post_type' => 'post',
'to_ping' => $postpost->to_ping,
'menu_order' => $postpost->menu_order,
);
$new_post_id = wp_insert_post($args);