ACF.php
8 years ago
NinjaForms.php
8 years ago
WPML.php
8 years ago
WPMLColumn.php
8 years ago
WooCommerce.php
8 years ago
ACF.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class AC_ThirdParty_ACF { |
| 8 | |
| 9 | public function __construct() { |
| 10 | add_filter( 'ac/post_types', array( $this, 'remove_acf_field_group' ) ); |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Fix which remove the Advanced Custom Fields Type (acf) from the admin columns settings page |
| 15 | * |
| 16 | * @since 2.0 |
| 17 | * |
| 18 | * @return array Post Types |
| 19 | */ |
| 20 | function remove_acf_field_group( $post_types ) { |
| 21 | if ( class_exists( 'Acf', false ) ) { |
| 22 | if ( isset( $post_types['acf'] ) ) { |
| 23 | unset( $post_types['acf'] ); |
| 24 | } |
| 25 | if ( isset( $post_types['acf-field-group'] ) ) { |
| 26 | unset( $post_types['acf-field-group'] ); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | return $post_types; |
| 31 | } |
| 32 | |
| 33 | } |
| 34 |