WP_Widget_Tag_Cloud::_get_current_taxonomy( array $instance ): string

In this article

Retrieves the taxonomy for the current Tag cloud widget instance.

Parameters

$instancearrayrequired
Current settings.

Return

string Name of the current taxonomy if set, otherwise 'post_tag'.

Source

public function _get_current_taxonomy( $instance ) {
	if ( ! empty( $instance['taxonomy'] ) && taxonomy_exists( $instance['taxonomy'] ) ) {
		return $instance['taxonomy'];
	}

	return 'post_tag';
}

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.