public function term_link( $termlink, $term, $taxonomy ) {
		/**
		 * WP_Rewrite.
		 *
		 * @var WP_Rewrite $wp_rewrite
		 */
		global $wp_rewrite;

		if ( ! $wp_rewrite->permalink_structure ) {
			return $termlink;
		}

		if ( CPTP_Util::get_no_taxonomy_structure() ) {
			return $termlink;
		}

		$taxonomy = get_taxonomy( $taxonomy );

		if ( empty( $taxonomy ) ) {
			return $termlink;
		}

		if ( $taxonomy->_builtin ) {
			return $termlink;
		}

		if ( ! $taxonomy->public ) {
			return $termlink;
		}

		$wp_home = rtrim( home_url(), '/' );

		if ( in_array( get_post_type(), $taxonomy->object_type, true ) ) {
			$post_type = get_post_type();
		} else {
			$post_type = $taxonomy->object_type[0];
		}

		$front         = substr( $wp_rewrite->front, 1 );
		$termlink      = str_replace( $front, '', $termlink );// remove front.

		$post_type_obj = get_post_type_object( $post_type );

		if ( empty( $post_type_obj ) ) {
			return $termlink;
		}

		$slug          = $post_type_obj->rewrite['slug'];
		$with_front    = $post_type_obj->rewrite['with_front'];

		if ( $with_front ) {
			$slug = $front . $slug;
		}

		if ( ! empty( $slug ) ) {
			$termlink = str_replace( $wp_home, $wp_home . '/' . $slug, $termlink );
		}

		if ( ! $taxonomy->rewrite['hierarchical'] ) {
			$termlink = str_replace( $term->slug . '/', CPTP_Util::get_taxonomy_parents_slug( $term->term_id, $taxonomy->name, '/', true ), $termlink );
		}

		return $termlink;
	}