| | |
| | | <?php |
| | | namespace JVBase\registrar; |
| | | |
| | | use JVBase\forms\TaxonomySelector; |
| | | |
| | | use JVBase\base\Site; |
| | | use JVBase\inc\registrar\helpers\HideSingle; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\managers\CRUD; |
| | |
| | | use JVBase\registrar\helpers\MakeTimelineType; |
| | | use JVBase\registrar\helpers\MakeTrackChanges; |
| | | use JVBase\registrar\helpers\MakeVerification; |
| | | use JVBase\utility\Features; |
| | | use WP_Post; |
| | | use WP_Query; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | |
| | | } |
| | | public function setIntegration(string $integration):self |
| | | { |
| | | if (!Features::forSite()->has($integration)){ |
| | | |
| | | if (!Site::hasIntegration($integration)){ |
| | | error_log('Integration not available for '.$this->slug.': '.$integration); |
| | | return $this; |
| | | } |
| | |
| | | public function getIntegrationFields(string $integration):AddIntegrationFields|false |
| | | { |
| | | |
| | | if (!Features::forSite()->has($integration)){ |
| | | if (!Site::has($integration)){ |
| | | error_log('Integration not available for '.$this->slug.': '.$integration); |
| | | return false; |
| | | } |
| | |
| | | public function hasIntegration(string $integration) { |
| | | return in_array($integration, $this->integrationConfigs); |
| | | } |
| | | public function hasAnyIntegrations(array $integrations = []):bool |
| | | { |
| | | if (empty($integrations)) { |
| | | $integrations = array_keys($this->integrationConfigs); |
| | | return !empty($integrations); |
| | | } |
| | | return !empty(array_intersect($integrations, array_keys($this->integrationConfigs))); |
| | | } |
| | | public function setUploadTitle(string $title):self |
| | | { |
| | | $this->upload_title = $title; |