Function Reference/is taxonomy hierarchical

来自WordPress中文文档
Zhuozuran讨论 | 贡献2009年3月14日 (六) 09:23的版本 (1个修订)
跳转至: 导航搜索

Description

This Conditional Tag checks if the taxonomy object is hierarchical. This is a boolean function uses a global, meaning it returns either TRUE or FALSE (A false return value might also mean that the taxonomy does not exist).

checks to make sure that the taxonomy is an object first. Then gets the object, and finally returns the hierarchical value in the object.

Usage

%%%?php is_taxonomy_hierarchical( $taxonomy ) ?%%%

Parameters

tt$taxonomy/tt
(string) (required) Name of taxonomy object
Default: Nonenoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

Return Values

(boolean) 
Whether the taxonomy is hierarchical

Examples

!-- Need creative examples. Feel free to link to external examples. --

Notes

Change Log

Since: 2.3.0

Source File

!-- Need links to current source code files -- ttis_taxonomy_hierarchical()/tt is located in ttwp-includes/taxonomy.php/tt.

Related

Conditional Tags: comments_open(), is_local_attachment(), is plugin active(), is_404(), is_admin(), is_archive(), is_attachment(), is_author(), is_category(), is_comments_popup(), is_date(), is_day(), is_feed(), is_front_page(), is_home(), is_month(), is_new_day(), is_page(), is_page_template(), is_paged(), is_plugin_page(), is_preview(), is_search(), is_single(), is_singular(), is_sticky(), is_tag(), is_tax(), is_taxonomy_hierarchical(), is_time(), is_trackback(), is_year(), in_category(), in_the_loop(), is_active_sidebar(), is_active_widget(), is_blog_installed(), is_dynamic_sidebar(), is_user_logged_in(), has_excerpt(), has_post_image(), has_tag(), pings_open(), post_type_exists(), taxonomy_exists(), term_exists(), username exists()