class-avcf-abilities-ase.php
4 days ago
class-avcf-ase-detector.php
4 days ago
class-avcf-ase-helpers.php
4 days ago
class-avcf-ase-detector.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Detects ASE (Admin and Site Enhancements — custom fields / CPT / taxonomy |
| 4 | * module). Definitions are stored as the asenha_cfgroup / asenha_cpt / |
| 5 | * asenha_ctax post types. |
| 6 | * |
| 7 | * @package atarim-visual-collaboration |
| 8 | */ |
| 9 | |
| 10 | if ( ! defined('ABSPATH') ) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | class AVCF_ASE_Detector { |
| 15 | |
| 16 | public function __construct() {} |
| 17 | |
| 18 | public function avcf_ase_is_available() { |
| 19 | return post_type_exists( 'asenha_cfgroup' ) || post_type_exists( 'asenha_cpt' ) || class_exists( 'cfgroup_init' ); |
| 20 | } |
| 21 | |
| 22 | public function avcf_ase_version() { |
| 23 | return defined( 'ASENHA_VERSION' ) ? ASENHA_VERSION : ''; |
| 24 | } |
| 25 | |
| 26 | public function avcf_ase_has_field_groups() { |
| 27 | return post_type_exists( 'asenha_cfgroup' ); |
| 28 | } |
| 29 | public function avcf_ase_has_post_types() { |
| 30 | return post_type_exists( 'asenha_cpt' ); |
| 31 | } |
| 32 | public function avcf_ase_has_taxonomies() { |
| 33 | return post_type_exists( 'asenha_ctax' ); |
| 34 | } |
| 35 | } |
| 36 |