Skip to content

Commit 53df5b1

Browse files
committed
Fill in the @param types for the args for functions missing them in wp-admin/includes/taxonomy.php.
See #30224. git-svn-id: https://develop.svn.wordpress.org/trunk@30197 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 43d027f commit 53df5b1

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

src/wp-admin/includes/taxonomy.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*
1616
* @since 2.0.0
1717
*
18-
* @param unknown_type $cat_name
19-
* @return unknown
18+
* @param int|string $cat_name
19+
* @return int
2020
*/
2121
function category_exists($cat_name, $parent = 0) {
2222
$id = term_exists($cat_name, 'category', $parent);
@@ -30,8 +30,8 @@ function category_exists($cat_name, $parent = 0) {
3030
*
3131
* @since 2.0.0
3232
*
33-
* @param unknown_type $id
34-
* @return unknown
33+
* @param int $id
34+
* @return object
3535
*/
3636
function get_category_to_edit( $id ) {
3737
$category = get_term( $id, 'category', OBJECT, 'edit' );
@@ -44,9 +44,9 @@ function get_category_to_edit( $id ) {
4444
*
4545
* @since 2.0.0
4646
*
47-
* @param unknown_type $cat_name
48-
* @param unknown_type $parent
49-
* @return unknown
47+
* @param int|string $cat_name
48+
* @param int $parent
49+
* @return int|WP_Error
5050
*/
5151
function wp_create_category( $cat_name, $parent = 0 ) {
5252
if ( $id = category_exists($cat_name, $parent) )
@@ -190,8 +190,8 @@ function wp_update_category($catarr) {
190190
*
191191
* @since 2.3.0
192192
*
193-
* @param unknown_type $tag_name
194-
* @return unknown
193+
* @param int|string $tag_name
194+
* @return mixed
195195
*/
196196
function tag_exists($tag_name) {
197197
return term_exists($tag_name, 'post_tag');
@@ -202,8 +202,8 @@ function tag_exists($tag_name) {
202202
*
203203
* @since 2.3.0
204204
*
205-
* @param unknown_type $tag_name
206-
* @return unknown
205+
* @param int|string $tag_name
206+
* @return array|WP_Error
207207
*/
208208
function wp_create_tag($tag_name) {
209209
return wp_create_term( $tag_name, 'post_tag');
@@ -214,8 +214,8 @@ function wp_create_tag($tag_name) {
214214
*
215215
* @since 2.3.0
216216
*
217-
* @param unknown_type $post_id
218-
* @return unknown
217+
* @param int $post_id
218+
* @return string|bool|WP_Error
219219
*/
220220
function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
221221
return get_terms_to_edit( $post_id, $taxonomy);
@@ -226,8 +226,8 @@ function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
226226
*
227227
* @since 2.8.0
228228
*
229-
* @param unknown_type $post_id
230-
* @return unknown
229+
* @param int $post_id
230+
* @return string|bool|WP_Error
231231
*/
232232
function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
233233
$post_id = (int) $post_id;
@@ -273,8 +273,8 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
273273
*
274274
* @since 2.8.0
275275
*
276-
* @param unknown_type $tag_name
277-
* @return unknown
276+
* @param int|string $tag_name
277+
* @return array|WP_Error
278278
*/
279279
function wp_create_term($tag_name, $taxonomy = 'post_tag') {
280280
if ( $id = term_exists($tag_name, $taxonomy) )

0 commit comments

Comments
 (0)