Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions.
These notations largely serve to direct consumers (of both the source and the parsed code reference) to extended information on individual and related conditional tags throughout WordPress. The changeset also standardizes corresponding DocBlock summaries to use third-person singular verbs. Notations been added for the following functions: * comments_open() * email exists() * has_excerpt() * has_post_thumbnail() * has_tag() * in_category() * in_the_loop() * is_404() * is_active_sidebar() * is_active_widget() * is_admin() * is_admin_bar_showing() * is_archive() * is_attachment() * is_author() * is_blog_installed() * is_category() * is_comments_popup() * is_date() * is_day() * is_dynamic_sidebar() * is_feed() * is_front_page() * is_home() * is_local_attachment() * is_main_query * is_month() * is_multi_author * is_new_day() * is_page() * is_page_template() * is_paged() * is_plugin_active() * is_plugin_active_for_network() * is_plugin_inactive() * is_plugin_page() * is_post_type_archive() * is_preview() * is_rtl() * is_search() * is_single() * is_singular() * is_sticky() * is_tag() * is_tax() * is_taxonomy_hierarchical() * is_time() * is_trackback() * is_user_logged_in() * is_year() * pings_open() * post_type_exists() * taxonomy_exists() * term_exists() * username exists() * wp_attachment_is_image() * wp_script_is() Props janalwin. Fixes #43254. Built from https://develop.svn.wordpress.org/trunk@42710 git-svn-id: http://core.svn.wordpress.org/trunk@42538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5e190dc084
commit
6e665d1f15
|
@ -457,13 +457,17 @@ function _get_dropins() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check whether a plugin is active.
|
||||
* Determines whether a plugin is active.
|
||||
*
|
||||
* Only plugins installed in the plugins/ folder can be active.
|
||||
*
|
||||
* Plugins in the mu-plugins/ folder can't be "activated," so this function will
|
||||
* return false for those plugins.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $plugin Path to the main plugin file from plugins directory.
|
||||
|
@ -474,10 +478,14 @@ function is_plugin_active( $plugin ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check whether the plugin is inactive.
|
||||
* Determines whether the plugin is inactive.
|
||||
*
|
||||
* Reverse of is_plugin_active(). Used as a callback.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @see is_plugin_active()
|
||||
*
|
||||
|
@ -489,17 +497,21 @@ function is_plugin_inactive( $plugin ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check whether the plugin is active for the entire network.
|
||||
* Determines whether the plugin is active for the entire network.
|
||||
*
|
||||
* Only plugins installed in the plugins/ folder can be active.
|
||||
*
|
||||
* Plugins in the mu-plugins/ folder can't be "activated," so this function will
|
||||
* return false for those plugins.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $plugin Path to the main plugin file from plugins directory.
|
||||
* @return bool True, if active for the network, otherwise false.
|
||||
* @return bool True if active for the network, otherwise false.
|
||||
*/
|
||||
function is_plugin_active_for_network( $plugin ) {
|
||||
if ( ! is_multisite() ) {
|
||||
|
|
|
@ -1117,8 +1117,12 @@ function show_admin_bar( $show ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Determine whether the admin bar should be showing.
|
||||
*
|
||||
* Determines whether the admin bar should be showing.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @global bool $show_admin_bar
|
||||
|
|
|
@ -521,10 +521,14 @@ function wp_list_authors( $args = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Does this site have more than one author
|
||||
* Determines whether this site has more than one author.
|
||||
*
|
||||
* Checks to see if more than one author has published posts.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
|
|
|
@ -221,7 +221,7 @@ function get_the_category_list( $separator = '', $parents = '', $post_id = false
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the current post is within any of the given categories.
|
||||
* Checks if the current post is within any of the given categories.
|
||||
*
|
||||
* The given categories are checked against the post's categories' term_ids, names and slugs.
|
||||
* Categories given as integers will only be checked against the post's categories' term_ids.
|
||||
|
@ -231,6 +231,10 @@ function get_the_category_list( $separator = '', $parents = '', $post_id = false
|
|||
* Prior to v2.7, only one category could be compared: in_category( $single_category ).
|
||||
* Prior to v2.7, this function could only be used in the WordPress Loop.
|
||||
* As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.2.0
|
||||
*
|
||||
|
@ -1406,7 +1410,7 @@ function has_category( $category = '', $post = null ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if the current post has any of given tags.
|
||||
* Checks if the current post has any of given tags.
|
||||
*
|
||||
* The given tags are checked against the post's tags' term_ids, names and slugs.
|
||||
* Tags given as integers will only be checked against the post's tags' term_ids.
|
||||
|
@ -1415,6 +1419,10 @@ function has_category( $category = '', $post = null ) {
|
|||
* Prior to v2.7 of WordPress, tags given as integers would also be checked against the post's tags' names and slugs (in addition to term_ids)
|
||||
* Prior to v2.7, this function could only be used in the WordPress Loop.
|
||||
* As of 2.7, the function can be used anywhere if it is provided a post ID or post object.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
|
|
|
@ -1201,8 +1201,12 @@ function trackback_rdf( $deprecated = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the current post is open for comments.
|
||||
*
|
||||
* Determines whether the current post is open for comments.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.
|
||||
|
@ -1227,7 +1231,11 @@ function comments_open( $post_id = null ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the current post is open for pings.
|
||||
* Determines whether the current post is open for pings.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
|
|
|
@ -2508,10 +2508,14 @@ function is_term( $term, $taxonomy = '', $parent = 0 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the current admin page generated by a plugin?
|
||||
* Determines whether the current admin page is generated by a plugin.
|
||||
*
|
||||
* Use global $plugin_page and/or get_plugin_page_hookname() hooks.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @deprecated 3.1.0
|
||||
*
|
||||
|
@ -3713,8 +3717,12 @@ function get_comments_popup_template() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the current URL is within the comments popup window.
|
||||
*
|
||||
* Determines whether the current URL is within the comments popup window.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @deprecated 4.5.0
|
||||
*
|
||||
|
|
|
@ -671,9 +671,13 @@ function wp_get_http_headers( $url, $deprecated = false ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the publish date of the current post in the loop is different from the
|
||||
* publish date of the previous post in the loop.
|
||||
*
|
||||
* Determines whether the publish date of the current post in the loop is different
|
||||
* from the publish date of the previous post in the loop.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 0.71
|
||||
*
|
||||
* @global string $currentday The day of the current post in the loop.
|
||||
|
@ -1382,13 +1386,17 @@ function do_robots() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test whether WordPress is already installed.
|
||||
* Determines whether WordPress is already installed.
|
||||
*
|
||||
* The cache will be checked first. If you have a cache plugin, which saves
|
||||
* the cache values, then this will work. If you use the default WordPress
|
||||
* cache, and the database goes away, then you might have problems.
|
||||
*
|
||||
* Checks for the 'siteurl' option for whether WordPress is installed.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
|
|
|
@ -319,8 +319,12 @@ function wp_dequeue_script( $handle ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check whether a script has been added to the queue.
|
||||
*
|
||||
* Determines whether a script has been added to the queue.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 3.5.0 'enqueued' added as an alias of the 'queue' list.
|
||||
*
|
||||
|
|
|
@ -1287,7 +1287,11 @@ function wp_dropdown_languages( $args = array() ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if current locale is RTL.
|
||||
* Determines whether the current locale is right-to-left (RTL).
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
|
|
@ -757,11 +757,15 @@ function wp_clone( $object ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the current request is for an administrative interface page.
|
||||
* Determines whether the current request is for an administrative interface page.
|
||||
*
|
||||
* Does not check if the user is an administrator; current_user_can()
|
||||
* for checking roles and capabilities.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.1
|
||||
*
|
||||
* @global WP_Screen $current_screen
|
||||
|
|
|
@ -981,8 +981,12 @@ endif;
|
|||
|
||||
if ( ! function_exists( 'is_user_logged_in' ) ) :
|
||||
/**
|
||||
* Checks if the current visitor is a logged in user.
|
||||
* Determines whether the current visitor is a logged in user.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @return bool True if user is logged in, false if not logged in.
|
||||
|
|
|
@ -412,7 +412,11 @@ function get_the_excerpt( $post = null ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the post has a custom excerpt.
|
||||
* Determines whether the post has a custom excerpt.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
|
@ -1686,12 +1690,16 @@ function get_the_password_form( $post = 0 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether currently in a page template.
|
||||
* Determines whether currently in a page template.
|
||||
*
|
||||
* This template tag allows you to determine if you are in a page template.
|
||||
* You can optionally provide a template name or array of template names
|
||||
* and then the check will be specific to that template.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @since 4.2.0 The `$template` parameter was changed to also accept an array of page templates.
|
||||
* @since 4.7.0 Now works with any post type, not just pages.
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Check if post has an image attached.
|
||||
* Determines whether a post has an image attached.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.9.0
|
||||
* @since 4.4.0 `$post` can be a post ID or WP_Post object.
|
||||
|
|
|
@ -971,7 +971,11 @@ function is_post_type_hierarchical( $post_type ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if a post type is registered.
|
||||
* Determines whether a post type is registered.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
@ -1981,11 +1985,15 @@ function get_post_custom_values( $key = '', $post_id = 0 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if post is sticky.
|
||||
* Determines whether a post is sticky.
|
||||
*
|
||||
* Sticky posts should remain at the top of The Loop. If the post ID is not
|
||||
* given, then The Loop ID for the current post will be used.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param int $post_id Optional. Post ID. Default is ID of the global $post.
|
||||
|
@ -5045,8 +5053,12 @@ function get_pages( $args = array() ) {
|
|||
//
|
||||
|
||||
/**
|
||||
* Check if the attachment URI is local one and is really an attachment.
|
||||
*
|
||||
* Determines whether an attachment URI is local and really an attachment.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param string $url URL to check
|
||||
|
@ -5520,7 +5532,11 @@ function wp_attachment_is( $type, $post = null ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if the attachment is an image.
|
||||
* Determines whether an attachment is an image.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 4.2.0 Modified into wrapper for wp_attachment_is() and
|
||||
|
|
|
@ -136,10 +136,14 @@ function wp_reset_postdata() {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Is the query for an existing archive page?
|
||||
* Determines whether the query is for an existing archive page.
|
||||
*
|
||||
* Month, Year, Category, Author, Post Type archive...
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -158,8 +162,12 @@ function is_archive() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing post type archive page?
|
||||
*
|
||||
* Determines whether the query is for an existing post type archive page.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.1.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -179,8 +187,12 @@ function is_post_type_archive( $post_types = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing attachment page?
|
||||
*
|
||||
* Determines whether the query is for an existing attachment page.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -200,11 +212,15 @@ function is_attachment( $attachment = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing author archive page?
|
||||
* Determines whether the query is for an existing author archive page.
|
||||
*
|
||||
* If the $author parameter is specified, this function will additionally
|
||||
* check if the query is for one of the authors specified.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -224,11 +240,15 @@ function is_author( $author = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing category archive page?
|
||||
* Determines whether the query is for an existing category archive page.
|
||||
*
|
||||
* If the $category parameter is specified, this function will additionally
|
||||
* check if the query is for one of the categories specified.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -248,10 +268,14 @@ function is_category( $category = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing tag archive page?
|
||||
* Determines whether the query is for an existing tag archive page.
|
||||
*
|
||||
* If the $tag parameter is specified, this function will additionally
|
||||
* check if the query is for one of the tags specified.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
|
@ -272,7 +296,7 @@ function is_tag( $tag = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing custom taxonomy archive page?
|
||||
* Determines whether the query is for an existing custom taxonomy archive page.
|
||||
*
|
||||
* If the $taxonomy parameter is specified, this function will additionally
|
||||
* check if the query is for that specific $taxonomy.
|
||||
|
@ -280,6 +304,10 @@ function is_tag( $tag = '' ) {
|
|||
* If the $term parameter is specified in addition to the $taxonomy parameter,
|
||||
* this function will additionally check if the query is for one of the terms
|
||||
* specified.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
|
@ -301,8 +329,12 @@ function is_tax( $taxonomy = '', $term = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing date archive?
|
||||
*
|
||||
* Determines whether the query is for an existing date archive.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -321,10 +353,14 @@ function is_date() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing day archive?
|
||||
* Determines whether the query is for an existing day archive.
|
||||
*
|
||||
* A conditional check to test whether the page is a date-based archive page displaying posts for the current day.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -343,8 +379,12 @@ function is_day() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for a feed?
|
||||
*
|
||||
* Determines whether the query is for a feed.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -384,7 +424,7 @@ function is_comment_feed() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for the front page of the site?
|
||||
* Determines whether the query is for the front page of the site.
|
||||
*
|
||||
* This is for what is displayed at your site's main URL.
|
||||
*
|
||||
|
@ -394,7 +434,11 @@ function is_comment_feed() {
|
|||
* true when viewing that page.
|
||||
*
|
||||
* Otherwise the same as @see is_home()
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -413,7 +457,7 @@ function is_front_page() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Determines if the query is for the blog homepage.
|
||||
* Determines whether the query is for the blog homepage.
|
||||
*
|
||||
* The blog homepage is the page that shows the time-based blog content of the site.
|
||||
*
|
||||
|
@ -422,7 +466,11 @@ function is_front_page() {
|
|||
*
|
||||
* If a static page is set for the front page of the site, this function will return true only
|
||||
* on the page you set as the "Posts page".
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @see is_front_page()
|
||||
|
@ -442,8 +490,12 @@ function is_home() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing month archive?
|
||||
*
|
||||
* Determines whether the query is for an existing month archive.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -462,11 +514,15 @@ function is_month() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing single page?
|
||||
* Determines whether the query is for an existing single page.
|
||||
*
|
||||
* If the $page parameter is specified, this function will additionally
|
||||
* check if the query is for one of the pages specified.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @see is_single()
|
||||
* @see is_singular()
|
||||
*
|
||||
|
@ -489,8 +545,12 @@ function is_page( $page = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for paged result and not for the first page?
|
||||
*
|
||||
* Determines whether the query is for paged results and not for the first page.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -509,8 +569,12 @@ function is_paged() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for a post or page preview?
|
||||
*
|
||||
* Determines whether the query is for a post or page preview.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -549,8 +613,12 @@ function is_robots() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for a search?
|
||||
*
|
||||
* Determines whether the query is for a search.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -569,13 +637,17 @@ function is_search() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing single post?
|
||||
* Determines whether the query is for an existing single post.
|
||||
*
|
||||
* Works for any post type, except attachments and pages
|
||||
*
|
||||
* If the $post parameter is specified, this function will additionally
|
||||
* check if the query is for one of the Posts specified.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @see is_page()
|
||||
* @see is_singular()
|
||||
*
|
||||
|
@ -598,12 +670,16 @@ function is_single( $post = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing single post of any post type (post, attachment, page,
|
||||
* custom post types)?
|
||||
* Determines whether the query is for an existing single post of any post type
|
||||
* (post, attachment, page, custom post types).
|
||||
*
|
||||
* If the $post_types parameter is specified, this function will additionally
|
||||
* check if the query is for one of the Posts Types specified.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @see is_page()
|
||||
* @see is_single()
|
||||
*
|
||||
|
@ -626,7 +702,11 @@ function is_singular( $post_types = '' ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for a specific time?
|
||||
* Determines whether the query is for a specific time.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
|
@ -646,7 +726,11 @@ function is_time() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for a trackback endpoint call?
|
||||
* Determines whether the query is for a trackback endpoint call.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
|
@ -666,7 +750,11 @@ function is_trackback() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query for an existing year archive?
|
||||
* Determines whether the query is for an existing year archive.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
|
@ -686,8 +774,12 @@ function is_year() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query a 404 (returns no results)?
|
||||
*
|
||||
* Determines whether the query has resulted in a 404 (returns no results).
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -726,8 +818,12 @@ function is_embed() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Is the query the main query?
|
||||
*
|
||||
* Determines whether the query is the main query.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @global WP_Query $wp_query Global WP_Query instance.
|
||||
|
@ -770,7 +866,11 @@ function have_posts() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the caller is in the Loop.
|
||||
* Determines whether the caller is in the Loop.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
|
|
|
@ -259,9 +259,13 @@ function get_taxonomy( $taxonomy ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks that the taxonomy name exists.
|
||||
* Determines whether the taxonomy name exists.
|
||||
*
|
||||
* Formerly is_taxonomy(), introduced in 2.3.0.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
@ -277,12 +281,16 @@ function taxonomy_exists( $taxonomy ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the taxonomy object is hierarchical.
|
||||
* Determines whether the taxonomy object is hierarchical.
|
||||
*
|
||||
* Checks to make sure that the taxonomy is an object first. Then Gets the
|
||||
* object, and finally returns the hierarchical value in the object.
|
||||
*
|
||||
* A false return value might also mean that the taxonomy does not exist.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
|
@ -1315,9 +1323,13 @@ function has_term_meta( $term_id ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if Term exists.
|
||||
* Determines whether a term exists.
|
||||
*
|
||||
* Formerly is_term(), introduced in 2.3.0.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
|
|
@ -1369,7 +1369,11 @@ function clean_user_cache( $user ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given username exists.
|
||||
* Determines whether the given username exists.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
|
@ -1395,7 +1399,11 @@ function username_exists( $username ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given email exists.
|
||||
* Determines whether the given email exists.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42709';
|
||||
$wp_version = '5.0-alpha-42710';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
@ -801,7 +801,7 @@ function dynamic_sidebar( $index = 1 ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether widget is displayed on the front end.
|
||||
* Determines whether a given widget is displayed on the front end.
|
||||
*
|
||||
* Either $callback or $id_base can be used
|
||||
* $id_base is the first argument when extending WP_Widget class
|
||||
|
@ -812,7 +812,11 @@ function dynamic_sidebar( $index = 1 ) {
|
|||
*
|
||||
* NOTE: $widget_id and $id_base are the same for single widgets. To be effective
|
||||
* this function has to run after widgets have initialized, at action {@see 'init'} or later.
|
||||
*
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_widgets
|
||||
|
@ -849,8 +853,12 @@ function is_active_widget( $callback = false, $widget_id = false, $id_base = fal
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether the dynamic sidebar is enabled and used by theme.
|
||||
*
|
||||
* Determines whether the dynamic sidebar is enabled and used by the theme.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.2.0
|
||||
*
|
||||
* @global array $wp_registered_widgets
|
||||
|
@ -874,8 +882,12 @@ function is_dynamic_sidebar() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether a sidebar is in use.
|
||||
*
|
||||
* Determines whether a sidebar is in use.
|
||||
*
|
||||
* For more information on this and similar theme functions, check out
|
||||
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
|
||||
* Conditional Tags} article in the Theme Developer Handbook.
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string|int $index Sidebar name, id or number to check.
|
||||
|
|
Loading…
Reference in New Issue