MediaLibraryAssistant
2 days ago
AdvancedCustomFields.php
2 days ago
NinjaForms.php
2 days ago
WPML.php
2 days ago
WPMLColumn.php
2 days ago
WooCommerce.php
2 days ago
AdvancedCustomFields.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ThirdParty; |
| 6 | |
| 7 | use AC\Acf; |
| 8 | use AC\Registerable; |
| 9 | |
| 10 | class AdvancedCustomFields implements Registerable |
| 11 | { |
| 12 | public function register(): void |
| 13 | { |
| 14 | if (! Acf::is_active()) { |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | add_filter('ac/post_types', static function (array $post_types) { |
| 19 | unset($post_types['acf-post-type']); |
| 20 | unset($post_types['acf-taxonomy']); |
| 21 | |
| 22 | return $post_types; |
| 23 | }); |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |