public function setup_taxonomies_hooks() {
		$this->taxonomy_types = papi_get_all_entry_types( [
			'types' => 'taxonomy'
		] );

		$taxonomies = array_reduce( $this->taxonomy_types, function ( $taxonomies, $taxonomy_type ) {
			return array_merge( $taxonomies, $taxonomy_type->taxonomy );
		}, [] );
		$taxonomies = array_unique( $taxonomies );

		foreach ( $taxonomies as $taxonomy ) {
			if ( is_string( $taxonomy ) && taxonomy_exists( $taxonomy ) ) {
				add_action( $taxonomy . '_add_form_fields', [$this, 'add_form_fields'] );
			}
		}
	}
public function setup_taxonomies_hooks() {
		$this->taxonomy_types = papi_get_all_entry_types( [
			'types' => 'taxonomy'
		] );

		$taxonomies = array_reduce( $this->taxonomy_types, function ( $taxonomies, $taxonomy_type ) {
			return array_merge( $taxonomies, $taxonomy_type->taxonomy );
		}, [] );
		$taxonomies = array_unique( $taxonomies );

		foreach ( $taxonomies as $taxonomy ) {
			if ( is_string( $taxonomy ) && taxonomy_exists( $taxonomy ) ) {
				add_action( $taxonomy . '_add_form_fields', [$this, 'add_form_fields'] );
			}
		}
	}
public function setup_taxonomies_hooks ( ) { $ this -> taxonomy_types = papi_get_all_entry_types ( [ 'types' => 'taxonomy' ] ) ; $ taxonomies = array_reduce ( $ this -> taxonomy_types , function ( $ taxonomies , $ taxonomy_type ) { return array_merge ( $ taxonomies , $ taxonomy_type -> taxonomy ) ; } , [ ] ) ; $ taxonomies = array_unique ( $ taxonomies ) ; foreach ( $ taxonomies as $ taxonomy ) { if ( is_string ( $ taxonomy ) && taxonomy_exists ( $ taxonomy ) ) { add_action ( $ taxonomy . '_add_form_fields' , [ $ this , 'add_form_fields' ] ) ; } } }
Setup hooks for all taxonomies.
Setup hooks for all taxonomies .