pollpress_filter('get_others_drafts'); } function is_post_not_a_poll($post) { $found = array_search($post->ID, $this->post_ids_of_polls); if ( ($found === null) || ($found === false) ) return true; return false; } function process($data) { if ( $data == null ) return $data; // $data is unfortunately the results of the sql query (as opposed to the sql query itself) // So run our own sql query, then manually hack up the resulting array (ugh). $poll_table = new pollpress_table_poll(); $this->post_ids_of_polls = $poll_table->get_post_ids_of_polls(); // This is an inefficient n*m algorithm. If I could only touch the SQL... $modified_data = array_filter($data, array(&$this, "is_post_not_a_poll")); return $modified_data; } } ?>