/** * Clean up shared fixtures. * * @since 4.1.0 */ public static function delete_shared_fixtures() { self::$author_id = null; self::$post_ids = array(); self::$comment_ids = array(); self::$term_ids = array(); self::$terms = array(); }
/** * Clean up shared fixtures. * * @since 4.1.0 */ public static function delete_shared_fixtures() { self::delete_user(self::$author_id); foreach (self::$post_ids as $pid) { wp_delete_post($pid, true); } foreach (self::$comment_ids as $cid) { wp_delete_comment($cid, true); } foreach (self::$term_ids as $tid => $tax) { wp_delete_term($tid, $tax); } self::$author_id = null; self::$post_ids = array(); self::$comment_ids = array(); self::$term_ids = array(); self::$terms = array(); }
/** * Clean up shared fixtures. * * @since 4.1.0 */ public static function delete_shared_fixtures() { global $wp_rewrite; if (is_multisite()) { wpmu_delete_user(self::$author_id); } else { wp_delete_user(self::$author_id); } foreach (self::$post_ids as $pid) { wp_delete_post($pid, true); } foreach (self::$comment_ids as $cid) { wp_delete_comment($cid, true); } foreach (self::$term_ids as $tid => $tax) { wp_delete_term($tid, $tax); } self::$author_id = null; self::$post_ids = array(); self::$comment_ids = array(); self::$term_ids = array(); self::$terms = array(); self::commit_transaction(); }