public function remove_item_by_method( $method, $data ) {
		// Search all items for one with the same title.
		$all_items = $this->get_items();
		foreach ( $all_items as $priority => $items ) {
			foreach ( $items as $item_key => $item ) {
				$method_result = call_user_func( array( $item, $method ), $data );
				if ( 0 === strcasecmp( $method_result, $data ) ) {
					// If we have a match, remove that item.
					unset( $all_items[ $priority ][ $item_key ] );
				}
			}
		}

		// Update the items.
		$this->set_items( $all_items );
	}