WP_Widget_Tag_Cloud::_get_current_taxonomy( array $instance ): string

Retrieves the taxonomy for the current Tag cloud widget instance.


Parameters

$instance array Required
Current settings.

Top ↑

Return

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


Top ↑

Source

File: wp-includes/widgets/class-wp-widget-tag-cloud.php. View all references

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

	return 'post_tag';
}


Top ↑

Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes

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