$function_to_add, 'accepted_args' => $accepted_args); unset( $merged_filters[ $tag ] ); return true; } function _test_filter_build_unique_id($tag, $function, $priority) { global $wp_filter; static $filter_id_count = 0; if ( is_string($function) ) return $function; if ( is_object($function) ) { // Closures are currently implemented as objects $function = array( $function, '' ); } else { $function = (array) $function; } if (is_object($function[0]) ) { return spl_object_hash($function[0]) . $function[1]; } else if ( is_string($function[0]) ) { // Static Calling return $function[0].$function[1]; } } function _delete_all_posts() { global $wpdb; $all_posts = $wpdb->get_col("SELECT ID from {$wpdb->posts}"); if ($all_posts) { foreach ($all_posts as $id) wp_delete_post( $id, true ); } }