post_title; $post_content = apply_filters('the_content',$post_data->post_content) ; $post_contents[$post_title] = $post_content; } if(is_array($post_contents)) { return $post_contents; } else { return false; } } function aspose_import_export_array_to_html($post_contents){ $upload_dir = wp_upload_dir(); $upload_path = $upload_dir['path'] . '/'; $filename = 'output.html'; $output_string = << EOD; foreach($post_contents as $post_title=>$post_content) { $output_string .= << {$post_title}

{$post_content}


EOD; } $output_string .= << EOD; file_put_contents($upload_path . $filename,$output_string); return $upload_path . $filename; }