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