Use correct escaping function. props duck_.
Comment Query: Use $this->query_vars instead of the nonexistent shorthand $q. see #23208.