@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | * |
292 | 292 | * @since 3.7.0 |
293 | 293 | * |
294 | - * @param WP_User|WP_Error|null $user WP_User or WP_Error object from a previous callback. Default null. |
|
294 | + * @param WP_User $user WP_User or WP_Error object from a previous callback. Default null. |
|
295 | 295 | * @return WP_User|WP_Error WP_User on success, WP_Error if the user is considered a spammer. |
296 | 296 | */ |
297 | 297 | function wp_authenticate_spam_check( $user ) { |
@@ -384,9 +384,9 @@ discard block |
||
384 | 384 | * @global wpdb $wpdb WordPress database abstraction object. |
385 | 385 | * |
386 | 386 | * @param array $users Array of user IDs. |
387 | - * @param string|array $post_type Optional. Single post type or array of post types to check. Defaults to 'post'. |
|
387 | + * @param string $post_type Optional. Single post type or array of post types to check. Defaults to 'post'. |
|
388 | 388 | * @param bool $public_only Optional. Only return counts for public posts. Defaults to false. |
389 | - * @return array Amount of posts each user has written. |
|
389 | + * @return WP_User Amount of posts each user has written. |
|
390 | 390 | */ |
391 | 391 | function count_many_users_posts( $users, $post_type = 'post', $public_only = false ) { |
392 | 392 | global $wpdb; |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | * |
779 | 779 | * @param int $user_id User ID |
780 | 780 | * @param string $meta_key Metadata name. |
781 | - * @param mixed $meta_value Optional. Metadata value. |
|
781 | + * @param string $meta_value Optional. Metadata value. |
|
782 | 782 | * @return bool True on success, false on failure. |
783 | 783 | */ |
784 | 784 | function delete_user_meta($user_id, $meta_key, $meta_value = '') { |
@@ -1254,7 +1254,7 @@ discard block |
||
1254 | 1254 | * @since 3.0.0 |
1255 | 1255 | * |
1256 | 1256 | * @param object|WP_User $user User object to be cached |
1257 | - * @return bool|null Returns false on failure. |
|
1257 | + * @return false|null Returns false on failure. |
|
1258 | 1258 | */ |
1259 | 1259 | function update_user_caches( $user ) { |
1260 | 1260 | if ( $user instanceof WP_User ) { |
@@ -31,6 +31,9 @@ |
||
31 | 31 | return wp_insert_attachment( $r, $r['file'], $r['post_parent'] ); |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $file |
|
36 | + */ |
|
34 | 37 | function create_upload_object( $file, $parent = 0 ) { |
35 | 38 | $contents = file_get_contents($file); |
36 | 39 | $upload = wp_upload_bits(basename($file), null, $contents); |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | global $current_site, $base; |
7 | 10 | parent::__construct( $factory ); |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Network extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Post extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -5,6 +5,10 @@ discard block |
||
5 | 5 | private $taxonomy; |
6 | 6 | const DEFAULT_TAXONOMY = 'post_tag'; |
7 | 7 | |
8 | + /** |
|
9 | + * @param WP_UnitTest_Factory $factory |
|
10 | + * @param string $taxonomy |
|
11 | + */ |
|
8 | 12 | function __construct( $factory = null, $taxonomy = null ) { |
9 | 13 | parent::__construct( $factory ); |
10 | 14 | $this->taxonomy = $taxonomy ? $taxonomy : self::DEFAULT_TAXONOMY; |
@@ -31,6 +35,9 @@ discard block |
||
31 | 35 | return $term_id_pair['term_id']; |
32 | 36 | } |
33 | 37 | |
38 | + /** |
|
39 | + * @param string $taxonomy |
|
40 | + */ |
|
34 | 41 | function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) { |
35 | 42 | return wp_set_post_terms( $post_id, $terms, $taxonomy, $append ); |
36 | 43 | } |
@@ -49,6 +49,9 @@ |
||
49 | 49 | |
50 | 50 | abstract function get_object_by_id( $object_id ); |
51 | 51 | |
52 | + /** |
|
53 | + * @param integer $count |
|
54 | + */ |
|
52 | 55 | function create_many( $count, $args = array(), $generation_definitions = null ) { |
53 | 56 | $results = array(); |
54 | 57 | for ( $i = 0; $i < $count; $i++ ) { |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |