mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Docs: Document parameters that accept an array of integers using typed array notation.
While many of these parameters also technically accept an array of numerical strings, they are all ultimately cast to an array of integers. Documenting them as such assists developers in understanding the expected types. See #51800, #41756 git-svn-id: https://develop.svn.wordpress.org/trunk@49672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1666,7 +1666,7 @@ function get_edit_user_link( $user_id = null ) {
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
|
||||
* corresponding post exists.
|
||||
@@ -1681,7 +1681,7 @@ function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxono
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
|
||||
* corresponding post exists.
|
||||
@@ -1700,7 +1700,7 @@ function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy =
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param bool $previous Optional. Whether to retrieve previous post. Default true
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
|
||||
@@ -1894,7 +1894,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
|
||||
*
|
||||
* @param string $title Optional. Link title format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param bool $previous Optional. Whether to display link to previous or next post. Default true.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return string|void The adjacent post relational link URL.
|
||||
@@ -1953,7 +1953,7 @@ function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $
|
||||
*
|
||||
* @param string $title Optional. Link title format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
function adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
|
||||
@@ -1988,7 +1988,7 @@ function adjacent_posts_rel_link_wp_head() {
|
||||
*
|
||||
* @param string $title Optional. Link title format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
|
||||
@@ -2004,7 +2004,7 @@ function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded
|
||||
*
|
||||
* @param string $title Optional. Link title format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
|
||||
@@ -2021,7 +2021,7 @@ function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded
|
||||
*
|
||||
* @param bool $in_same_term Optional. Whether returned post should be in a same taxonomy term.
|
||||
* Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
|
||||
* Default empty.
|
||||
* @param bool $start Optional. Whether to retrieve first or last post. Default true
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
@@ -2085,7 +2085,7 @@ function get_boundary_post( $in_same_term = false, $excluded_terms = '', $start
|
||||
* @param string $format Optional. Link anchor format. Default '« %link'.
|
||||
* @param string $link Optional. Link permalink format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return string The link URL of the previous post in relation to the current post.
|
||||
*/
|
||||
@@ -2103,7 +2103,7 @@ function get_previous_post_link( $format = '« %link', $link = '%title', $i
|
||||
* @param string $format Optional. Link anchor format. Default '« %link'.
|
||||
* @param string $link Optional. Link permalink format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
function previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
|
||||
@@ -2118,7 +2118,7 @@ function previous_post_link( $format = '« %link', $link = '%title', $in_sa
|
||||
* @param string $format Optional. Link anchor format. Default '« %link'.
|
||||
* @param string $link Optional. Link permalink format. Default '%title'.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return string The link URL of the next post in relation to the current post.
|
||||
*/
|
||||
@@ -2136,7 +2136,7 @@ function get_next_post_link( $format = '%link »', $link = '%title', $in_sa
|
||||
* @param string $format Optional. Link anchor format. Default '« %link'.
|
||||
* @param string $link Optional. Link permalink format. Default '%title'
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
function next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
|
||||
@@ -2153,7 +2153,7 @@ function next_post_link( $format = '%link »', $link = '%title', $in_same_t
|
||||
* @param string $format Link anchor format.
|
||||
* @param string $link Link permalink format.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
|
||||
* @param bool $previous Optional. Whether to display link to previous or next post. Default true.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
* @return string The link URL of the previous or next post in relation to the current post.
|
||||
@@ -2218,7 +2218,7 @@ function get_adjacent_post_link( $format, $link, $in_same_term = false, $exclude
|
||||
* @param string $format Link anchor format.
|
||||
* @param string $link Link permalink format.
|
||||
* @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false.
|
||||
* @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
|
||||
* @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
|
||||
* @param bool $previous Optional. Whether to display link to previous or next post. Default true.
|
||||
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
|
||||
*/
|
||||
@@ -2567,7 +2567,7 @@ function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) {
|
||||
* @type string $prev_text Anchor text to display in the previous post link. Default '%title'.
|
||||
* @type string $next_text Anchor text to display in the next post link. Default '%title'.
|
||||
* @type bool $in_same_term Whether link should be in a same taxonomy term. Default false.
|
||||
* @type array|string $excluded_terms Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @type int[]|string $excluded_terms Array or comma-separated list of excluded term IDs. Default empty.
|
||||
* @type string $taxonomy Taxonomy, if `$in_same_term` is true. Default 'category'.
|
||||
* @type string $screen_reader_text Screen reader text for the nav element. Default 'Post navigation'.
|
||||
* @type string $aria_label ARIA label text for the nav element. Default 'Posts'.
|
||||
|
||||
Reference in New Issue
Block a user