Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_USERCREATESPOST::get_all_post_tax( $post_id,  $post_type,  $recipe_id,  $trigger_id )

Used when Any taxonomy, Any terms are used


Parameters Parameters

$post_id

(Required)

$post_type

(Required)

$recipe_id

(Required)

$trigger_id

(Required)


Top ↑

Return Return

(array)


Source Source

File: src/integrations/wp/triggers/wp-usercreatespost.php

	private function get_all_post_tax( $post_id, $post_type, $recipe_id, $trigger_id ) {
		$all_terms  = array();
		$post_type  = get_post_type_object( $post_type );
		$taxonomies = get_object_taxonomies( $post_type->name, 'object' );
		if ( empty( $taxonomies ) ) {
			return $all_terms;
		}
		foreach ( $taxonomies as $taxonomy ) {
			$post_terms = wp_get_post_terms( $post_id, $taxonomy->name );
			if ( empty( $post_terms ) ) {
				continue;
			}
			$this->taxonomy_list[ $recipe_id ][ $trigger_id ][ $taxonomy->name ] = $taxonomy->labels->singular_name;
			foreach ( $post_terms as $term ) {
				$all_terms[] = $term;
			}
		}
		return $all_terms;
	}