Docs: Mark the internal functions as `@private` in `wp-includes/post.php`.
Props shamim51. Fixes #44502. git-svn-id: https://develop.svn.wordpress.org/trunk@44636 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bcba20dd2b
commit
15f4df2af6
|
@ -1693,8 +1693,9 @@ function get_archives_link( $url, $text, $format = 'html', $before = '', $after
|
||||||
* @param string $format Link format. Can be 'link', 'option', 'html', or custom.
|
* @param string $format Link format. Can be 'link', 'option', 'html', or custom.
|
||||||
* @param string $before Content to prepend to the description.
|
* @param string $before Content to prepend to the description.
|
||||||
* @param string $after Content to append to the description.
|
* @param string $after Content to append to the description.
|
||||||
|
* @param bool $selected True if the current page is the selected archive
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after );
|
return apply_filters( 'get_archives_link', $link_html, $url, $text, $format, $before, $after, $selected );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1820,7 +1821,9 @@ function wp_get_archives( $args = '' ) {
|
||||||
if ( $r['show_post_count'] ) {
|
if ( $r['show_post_count'] ) {
|
||||||
$r['after'] = ' (' . $result->posts . ')' . $after;
|
$r['after'] = ' (' . $result->posts . ')' . $after;
|
||||||
}
|
}
|
||||||
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
|
$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year
|
||||||
|
&& ( string ) $r[ 'monthnum' ] === $result->month;
|
||||||
|
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ( 'yearly' == $r['type'] ) {
|
} elseif ( 'yearly' == $r['type'] ) {
|
||||||
|
@ -1842,7 +1845,8 @@ function wp_get_archives( $args = '' ) {
|
||||||
if ( $r['show_post_count'] ) {
|
if ( $r['show_post_count'] ) {
|
||||||
$r['after'] = ' (' . $result->posts . ')' . $after;
|
$r['after'] = ' (' . $result->posts . ')' . $after;
|
||||||
}
|
}
|
||||||
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
|
$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year;
|
||||||
|
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ( 'daily' == $r['type'] ) {
|
} elseif ( 'daily' == $r['type'] ) {
|
||||||
|
@ -1865,7 +1869,10 @@ function wp_get_archives( $args = '' ) {
|
||||||
if ( $r['show_post_count'] ) {
|
if ( $r['show_post_count'] ) {
|
||||||
$r['after'] = ' (' . $result->posts . ')' . $after;
|
$r['after'] = ' (' . $result->posts . ')' . $after;
|
||||||
}
|
}
|
||||||
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
|
$selected = is_archive() && ( string ) $r[ 'year' ] === $result->year
|
||||||
|
&& ( string ) $r[ 'monthnum' ] === $result->month
|
||||||
|
&& ( string ) $r[ 'day' ] === $result->dayofmonth;
|
||||||
|
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ( 'weekly' == $r['type'] ) {
|
} elseif ( 'weekly' == $r['type'] ) {
|
||||||
|
@ -1901,7 +1908,9 @@ function wp_get_archives( $args = '' ) {
|
||||||
if ( $r['show_post_count'] ) {
|
if ( $r['show_post_count'] ) {
|
||||||
$r['after'] = ' (' . $result->posts . ')' . $after;
|
$r['after'] = ' (' . $result->posts . ')' . $after;
|
||||||
}
|
}
|
||||||
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
|
$selected = is_archive() && ( string ) $r[ 'year' ] === $result->yr
|
||||||
|
&& ( string ) $r[ 'week' ] === $result->week;
|
||||||
|
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1924,7 +1933,8 @@ function wp_get_archives( $args = '' ) {
|
||||||
} else {
|
} else {
|
||||||
$text = $result->ID;
|
$text = $result->ID;
|
||||||
}
|
}
|
||||||
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'] );
|
$selected = $result->ID === get_the_ID();
|
||||||
|
$output .= get_archives_link( $url, $text, $r['format'], $r['before'], $r['after'], $selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -507,6 +507,7 @@ function update_attached_file( $attachment_id, $file ) {
|
||||||
* The path is relative to the current upload dir.
|
* The path is relative to the current upload dir.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
|
* @access private
|
||||||
*
|
*
|
||||||
* @param string $path Full path to the file.
|
* @param string $path Full path to the file.
|
||||||
* @return string Relative path on success, unchanged path on failure.
|
* @return string Relative path on success, unchanged path on failure.
|
||||||
|
@ -913,6 +914,7 @@ function get_page_statuses() {
|
||||||
* Return statuses for privacy requests.
|
* Return statuses for privacy requests.
|
||||||
*
|
*
|
||||||
* @since 4.9.6
|
* @since 4.9.6
|
||||||
|
* @access private
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -2481,6 +2483,7 @@ function unstick_post( $post_id ) {
|
||||||
* Return the cache key for wp_count_posts() based on the passed arguments.
|
* Return the cache key for wp_count_posts() based on the passed arguments.
|
||||||
*
|
*
|
||||||
* @since 3.9.0
|
* @since 3.9.0
|
||||||
|
* @access private
|
||||||
*
|
*
|
||||||
* @param string $type Optional. Post type to retrieve count Default 'post'.
|
* @param string $type Optional. Post type to retrieve count Default 'post'.
|
||||||
* @param string $perm Optional. 'readable' or empty. Default empty.
|
* @param string $perm Optional. 'readable' or empty. Default empty.
|
||||||
|
@ -4903,6 +4906,7 @@ function get_page_hierarchy( &$pages, $page_id = 0 ) {
|
||||||
* $children contains parent-children relations
|
* $children contains parent-children relations
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
|
* @access private
|
||||||
*
|
*
|
||||||
* @see _page_traverse_name()
|
* @see _page_traverse_name()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue