Improve the @param docs for src/wp-includes/post*.php.

See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-11-30 22:37:00 +00:00
parent 3c558b7436
commit 4de850c8ff
2 changed files with 22 additions and 23 deletions

View File

@ -206,7 +206,7 @@ function get_the_guid( $id = 0 ) {
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
*/
function the_content( $more_link_text = null, $strip_teaser = false) {
$content = get_the_content( $more_link_text, $strip_teaser );
@ -229,7 +229,7 @@ function the_content( $more_link_text = null, $strip_teaser = false) {
* @since 0.71
*
* @param string $more_link_text Optional. Content for when there is more text.
* @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
* @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
* @return string
*/
function get_the_content( $more_link_text = null, $strip_teaser = false ) {
@ -1446,9 +1446,9 @@ class Walker_PageDropdown extends Walker {
* @since 2.0.0
*
* @param int|WP_Post $id Optional. Post ID or post object.
* @param bool $fullsize Optional, default is false. Whether to use full size.
* @param bool $deprecated Deprecated. Not used.
* @param bool $permalink Optional, default is false. Whether to include permalink.
* @param bool $fullsize Optional, default is false. Whether to use full size.
* @param bool $deprecated Deprecated. Not used.
* @param bool $permalink Optional, default is false. Whether to include permalink.
*/
function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
if ( !empty( $deprecated ) )
@ -1465,12 +1465,12 @@ function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $
*
* @since 2.5.0
*
* @param int|WP_Post $id Optional. Post ID or post object.
* @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
* @param bool $permalink Optional, default is false. Whether to add permalink to image.
* @param bool $icon Optional, default is false. Whether to include icon.
* @param string|bool $text Optional, default is false. If string, then will be link text.
* @param array|string $attr Optional. Array or string of attributes.
* @param int|WP_Post $id Optional. Post ID or post object.
* @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
* @param bool $permalink Optional, default is false. Whether to add permalink to image.
* @param bool $icon Optional, default is false. Whether to include icon.
* @param string|bool $text Optional, default is false. If string, then will be link text.
* @param array|string $attr Optional. Array or string of attributes.
* @return string HTML content.
*/
function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) {
@ -1730,7 +1730,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
* @since 2.6.0
*
* @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
* @param string $type 'all' (default), 'revision' or 'autosave'
* @param string $type 'all' (default), 'revision' or 'autosave'
* @return null
*/
function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {

View File

@ -839,7 +839,7 @@ function get_post_field( $field, $post, $context = 'display' ) {
* @since 2.0.0
*
* @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
* @return string|bool The mime type on success, false on failure.
* @return string|false The mime type on success, false on failure.
*/
function get_post_mime_type( $ID = '' ) {
$post = get_post($ID);
@ -859,7 +859,7 @@ function get_post_mime_type( $ID = '' ) {
* @since 2.0.0
*
* @param int|WP_Post $ID Optional. Post ID or post object. Default empty.
* @return string|bool Post status on success, false on failure.
* @return string|false Post status on success, false on failure.
*/
function get_post_status( $ID = '' ) {
$post = get_post($ID);
@ -1124,7 +1124,7 @@ function post_type_exists( $post_type ) {
* @since 2.1.0
*
* @param int|WP_Post $post Optional. Post ID or post object. Default is global $post.
* @return string|bool Post type on success, false on failure.
* @return string|false Post type on success, false on failure.
*/
function get_post_type( $post = null ) {
if ( $post = get_post( $post ) )
@ -2856,7 +2856,7 @@ function wp_trash_post_comments( $post = null ) {
* @since 2.9.0
*
* @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post.
* @return mixed False on failure.
* @return null|bool Null on failure.
*/
function wp_untrash_post_comments( $post = null ) {
global $wpdb;
@ -2984,7 +2984,6 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
*
* @see get_posts()
*
* @param string $deprecated Not used.
* @param array $args Optional. Arguments to retrieve posts. Default empty array.
* @param string $output Optional. Type of output. Accepts ARRAY_A or ''. Default ARRAY_A.
* @return array|bool Associative array if $output equals ARRAY_A, array or false if no results.
@ -3720,7 +3719,7 @@ function wp_unique_post_slug( $slug, $post_ID, $post_status, $post_type, $post_p
$suffix = 2;
do {
$alt_post_name = _truncate_post_slug( $slug, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_type, $post_ID, $post_parent ) );
$suffix++;
} while ( $post_name_check );
$slug = $alt_post_name;
@ -3916,9 +3915,9 @@ function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $appe
*
* @since 2.3.0
*
* @param string $new_status Transition to this post status.
* @param string $old_status Previous post status.
* @param object $post Post data.
* @param string $new_status Transition to this post status.
* @param string $old_status Previous post status.
* @param WP_Post $post Post data.
*/
function wp_transition_post_status( $new_status, $old_status, $post ) {
/**
@ -5702,7 +5701,7 @@ function _publish_post_hook( $post_id ) {
*
* @since 3.1.0
*
* @param int $post_id
* @param int $post_ID
*
* @return int|bool Post parent ID, otherwise false.
*/
@ -5838,7 +5837,7 @@ function _update_term_count_on_transition_post_status( $new_status, $old_status,
*
* @see update_post_caches()
*
* @param array $post_ids ID list
* @param array $ids ID list
* @param bool $update_term_cache Optional. Whether to update the term cache. Default true.
* @param bool $update_meta_cache Optional. Whether to update the meta cache. Default true.
*/