Update the parameter docs for wp_add_post_tags(), wp_set_post_tags(), and wp_set_post_terms().

Props johnbillion.
Fixes #33749.

git-svn-id: https://develop.svn.wordpress.org/trunk@33931 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-09-06 00:11:56 +00:00
parent 8512ff08c0
commit 4fb57210cd

View File

@ -3608,10 +3608,10 @@ function _truncate_post_slug( $slug, $length = 200 ) {
*
* @since 2.3.0
*
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* Default 0.
* @param string $tags Optional. The tags to set for the post, separated by commas. Default empty.
* @return array|false|WP_Error Will return false if $post_id is not an integer or is 0.
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* @param string|array $tags Optional. An array of tags to set for the post, or a string of tags
* separated by commas. Default empty.
* @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
*/
function wp_add_post_tags( $post_id = 0, $tags = '' ) {
return wp_set_post_tags($post_id, $tags, true);
@ -3624,11 +3624,11 @@ function wp_add_post_tags( $post_id = 0, $tags = '' ) {
*
* @see wp_set_object_terms()
*
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* @param string $tags Optional. The tags to set for the post, separated by commas.
* Default empty.
* @param bool $append Optional. If true, don't delete existing tags, just add on. If false,
* replace the tags with the new tags. Default false.
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* @param string|array $tags Optional. An array of tags to set for the post, or a string of tags
* separated by commas. Default empty.
* @param bool $append Optional. If true, don't delete existing tags, just add on. If false,
* replace the tags with the new tags. Default false.
* @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
*/
function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
@ -3642,11 +3642,12 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
*
* @see wp_set_object_terms()
*
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* @param string $tags Optional. The tags to set for the post, separated by commas. Default empty.
* @param string $taxonomy Optional. Taxonomy name. Default 'post_tag'.
* @param bool $append Optional. If true, don't delete existing tags, just add on. If false,
* replace the tags with the new tags. Default false.
* @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post.
* @param string|array $tags Optional. An array of terms to set for the post, or a string of terms
* separated by commas. Default empty.
* @param string $taxonomy Optional. Taxonomy name. Default 'post_tag'.
* @param bool $append Optional. If true, don't delete existing terms, just add on. If false,
* replace the terms with the new terms. Default false.
* @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
*/
function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $append = false ) {