/** * Delete permanently the provided posts. * * @param array $posts An array of posts. * * @return bool True if successful otherwise false. */ function wl_delete_posts($posts) { $success = true; foreach ($posts as $post) { $success &= wl_delete_post($post->ID, true); } return $success; }
/** * Delete a post. * * @param $post_id */ function deletePost($post_id) { // Delete the post. $result = wl_delete_post($post_id); $this->assertTrue(false != $result); }