WP_Widget_Tag_Cloud::_get_current_taxonomy( array $instance )
Retrieves the taxonomy for the current Tag cloud widget instance.
Description Description
Parameters Parameters
- $instance
-
(array) (Required) Current settings.
Return Return
(string) Name of the current taxonomy if set, otherwise 'post_tag'.
Source Source
File: wp-includes/widgets/class-wp-widget-tag-cloud.php
public function _get_current_taxonomy( $instance ) {
if ( ! empty( $instance['taxonomy'] ) && taxonomy_exists( $instance['taxonomy'] ) ) {
return $instance['taxonomy'];
}
return 'post_tag';
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |