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
NinjaForms.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\ThirdParty; |
| 6 | |
| 7 | use AC\Registerable; |
| 8 | |
| 9 | class NinjaForms implements Registerable |
| 10 | { |
| 11 | public function register(): void |
| 12 | { |
| 13 | add_filter('ac/post_types', [$this, 'remove_nf_sub']); |
| 14 | } |
| 15 | |
| 16 | public function remove_nf_sub($post_types) |
| 17 | { |
| 18 | if (class_exists('Ninja_Forms', false)) { |
| 19 | if (isset($post_types['nf_sub'])) { |
| 20 | unset($post_types['nf_sub']); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | return $post_types; |
| 25 | } |
| 26 | |
| 27 | } |
| 28 |