| | |
| | | use JVBase\rest\Rest; |
| | | use JVBase\rest\Route; |
| | | use JVBase\rest\Response; |
| | | use JVBase\utility\Features; |
| | | use JVBase\base\Site; |
| | | use WP_REST_Request; |
| | | use WP_REST_Response; |
| | | use Exception; |
| | |
| | | public function __construct() |
| | | { |
| | | $this->cacheName = 'approvals'; |
| | | $this->hasMemberApproval = Features::forMembership()->has('member_verified'); |
| | | $this->hasMemberApproval = Site::membership() && Site::membership()->has('member_verified'); |
| | | parent::__construct(); |
| | | |
| | | $this->initTypes(); |
| | |
| | | $this->userTypes = Registrar::getFeatured('approve_new', 'user'); |
| | | $this->allTypes = $this->userTypes; |
| | | } |
| | | if (Features::forSite()->has('term_approval')) { |
| | | if (Site::has('term_approval')) { |
| | | $this->termTypes = Registrar::getFeatured('approve_new', 'term'); |
| | | $this->allTypes[] = 'term'; |
| | | } |