public function allowed() { $args = func_get_args(); return empty($args) ? parent::allowed() : papi_current_user_is_allowed($this->capabilities) && isset($args[0]) && in_array($args[0], $this->post_type, true); }