WP_Widget_Tag_Cloud::_get_current_taxonomy()
Retrieves the taxonomy for the current Tag cloud widget instance.
Method of the class: WP_Widget_Tag_Cloud{}
No Hooks.
Return
String
. Name of the current taxonomy if set, otherwise 'post_tag'.
Usage
$WP_Widget_Tag_Cloud = new WP_Widget_Tag_Cloud(); $WP_Widget_Tag_Cloud->_get_current_taxonomy( $instance );
- $instance(array) (required)
- Current settings.
Changelog
Since 4.4.0 | Introduced. |
WP_Widget_Tag_Cloud::_get_current_taxonomy() WP Widget Tag Cloud:: get current taxonomy code WP 6.6.2
public function _get_current_taxonomy( $instance ) { if ( ! empty( $instance['taxonomy'] ) && taxonomy_exists( $instance['taxonomy'] ) ) { return $instance['taxonomy']; } return 'post_tag'; }