original_string: public static function get_taxonomy_parents( $term, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {
  		$chain  = '';
  		$parent = get_term( $term, $taxonomy );
  		if ( is_wp_error( $parent ) ) {
  			return $parent;
  		}
  
  		if ( $nicename ) {
  			$name = $parent->slug;
  		} else {
  			$name = $parent->name;
  		}
  
  		if ( $parent->parent && ( $parent->parent !== $parent->term_id ) && ! in_array( $parent->parent, $visited, true ) ) {
  			$visited[] = $parent->parent;
  			$chain     .= CPTP_Util::get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );
  		}
  		if ( $link ) {
  			$chain .= '<a href="' . get_term_link( $parent->term_id, $taxonomy ) . '" title="' . esc_attr( sprintf( __( 'View all posts in %s' ), $parent->name ) ) . '">' . esc_html( $name ) . '</a>' . esc_html( $separator );
  		} else {
  			$chain .= $name . $separator;
  		}
  
  		return $chain;
  	}
code: public static function get_taxonomy_parents( $term, $taxonomy = 'category', $link = false, $separator = '/', $nicename = false, $visited = array() ) {
  		$chain  = '';
  		$parent = get_term( $term, $taxonomy );
  		if ( is_wp_error( $parent ) ) {
  			return $parent;
  		}
  
  		if ( $nicename ) {
  			$name = $parent->slug;
  		} else {
  			$name = $parent->name;
  		}
  
  		if ( $parent->parent && ( $parent->parent !== $parent->term_id ) && ! in_array( $parent->parent, $visited, true ) ) {
  			$visited[] = $parent->parent;
  			$chain     .= CPTP_Util::get_taxonomy_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );
  		}
  		if ( $link ) {
  			$chain .= '<a href="' . get_term_link( $parent->term_id, $taxonomy ) . '" title="' . esc_attr( sprintf( __( 'View all posts in %s' ), $parent->name ) ) . '">' . esc_html( $name ) . '</a>' . esc_html( $separator );
  		} else {
  			$chain .= $name . $separator;
  		}
  
  		return $chain;
  	}
code_tokens: public static function get_taxonomy_parents ( $ term , $ taxonomy = 'category' , $ link = false , $ separator = '/' , $ nicename = false , $ visited = array ( ) ) { $ chain = '' ; $ parent = get_term ( $ term , $ taxonomy ) ; if ( is_wp_error ( $ parent ) ) { return $ parent ; } if ( $ nicename ) { $ name = $ parent -> slug ; } else { $ name = $ parent -> name ; } if ( $ parent -> parent && ( $ parent -> parent !== $ parent -> term_id ) && ! in_array ( $ parent -> parent , $ visited , true ) ) { $ visited [ ] = $ parent -> parent ; $ chain .= CPTP_Util :: get_taxonomy_parents ( $ parent -> parent , $ taxonomy , $ link , $ separator , $ nicename , $ visited ) ; } if ( $ link ) { $ chain .= '<a href="' . get_term_link ( $ parent -> term_id , $ taxonomy ) . '" title="' . esc_attr ( sprintf ( __ ( 'View all posts in %s' ) , $ parent -> name ) ) . '">' . esc_html ( $ name ) . '</a>' . esc_html ( $ separator ) ; } else { $ chain .= $ name . $ separator ; } return $ chain ; }
docstring: Get Custom Taxonomies parents.
  
  @deprecated
  
  @param int|WP_Term|object $term term.
  @param string             $taxonomy taxonomy.
  @param bool               $link show link html.
  @param string             $separator separator string.
  @param bool               $nicename use slug or name.
  @param array              $visited visited term.
  
  @return string
docstring_tokens: Get Custom Taxonomies parents .