Changeset 46985
- Timestamp:
- 12/18/2019 12:17:54 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r46973 r46985 4151 4151 * objects are not. Default array. 4152 4152 * @param bool $wp_error Optional. Allow return of WP_Error on failure. Default false. 4153 * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success.4153 * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. 4154 4154 */ 4155 4155 function wp_update_post( $postarr = array(), $wp_error = false ) { -
trunk/src/wp-includes/taxonomy.php
r46823 r46985 810 810 * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT. 811 811 * @param string $filter Optional, default is raw or no WordPress defined filter will applied. 812 * @return array|WP_Term|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',812 * @return WP_Term|array|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT', 813 813 * a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is 814 814 * returned. Returns null for miscellaneous failure. -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php
r46586 r46985 15 15 * @param array $legacy_args Deprecated. 16 16 * 17 * @return 17 * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure. 18 18 */ 19 19 public function create_object( $args, $legacy_parent = 0, $legacy_args = array() ) { … … 41 41 * 42 42 * @param string $file The file name to create attachment object for. 43 * @param int $parent The post idto attach the file to.43 * @param int $parent ID of the post to attach the file to. 44 44 * 45 45 * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure. -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-blog.php
r46586 r46985 25 25 26 26 /** 27 * Creates a blogobject.27 * Creates a site object. 28 28 * 29 29 * @param array $args Arguments for the site object. 30 30 * 31 * @return int|WP_Error Returns WP_Error object on failure, the site ID on success.31 * @return int|WP_Error The site ID on success, WP_Error object on failure. 32 32 */ 33 33 public function create_object( $args ) { … … 47 47 48 48 /** 49 * Updates a blogobject. Not implemented.49 * Updates a site object. Not implemented. 50 50 * 51 * @param int $blog_id The blog idto update.51 * @param int $blog_id ID of the site to update. 52 52 * @param array $fields The fields to update. 53 53 * … … 57 57 58 58 /** 59 * Retrieves a site by given blog id.59 * Retrieves a site by a given ID. 60 60 * 61 * @param int $blog_id The blog idto retrieve.61 * @param int $blog_id ID of the site to retrieve. 62 62 * 63 * @return null|WP_Site The site object or null if not found.63 * @return WP_Site|null The site object on success, null on failure. 64 64 */ 65 65 public function get_object_by_id( $blog_id ) { -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-comment.php
r46586 r46985 37 37 * Updates a comment. 38 38 * 39 * @param int $comment_id The comment id.39 * @param int $comment_id The comment ID. 40 40 * @param array $fields The comment details. 41 41 * … … 48 48 49 49 /** 50 * Creates multiple comments on given post.50 * Creates multiple comments on a given post. 51 51 * 52 * @param int $post_id The post idto create comments for.52 * @param int $post_id ID of the post to create comments for. 53 53 * @param int $count Total amount of comments to create. 54 54 * @param array $args The comment details. 55 55 * @param null $generation_definitions Default values. 56 56 * 57 * @return int[] Array with the comment ids.57 * @return int[] Array with the comment IDs. 58 58 */ 59 59 public function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) { … … 63 63 64 64 /** 65 * Ret urns a comment.65 * Retrieves a comment by a given ID. 66 66 * 67 * @param int $comment_id The comment id.67 * @param int $comment_id ID of the comment to retrieve. 68 68 * 69 * @return null|WP_Comment WP_Comment when found, null when not found.69 * @return WP_Comment|null WP_Comment object on success, null on failure. 70 70 */ 71 71 public function get_object_by_id( $comment_id ) { -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php
r46586 r46985 38 38 * Updates an existing post object. 39 39 * 40 * @param int $post_id The post idto update.40 * @param int $post_id ID of the post to update. 41 41 * @param array $fields Post data. 42 42 * 43 * @return int|WP_Error The value 0 or WP_Error on failure. The post ID on success.43 * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. 44 44 */ 45 45 public function update_object( $post_id, $fields ) { … … 49 49 50 50 /** 51 * Retrieves a object by an id.51 * Retrieves a post by a given ID. 52 52 * 53 * @param int $post_id The post id to update.53 * @param int $post_id ID of the post to retrieve. 54 54 * 55 * @return null|WP_Post WP_Post on success ornull on failure.55 * @return WP_Post|null WP_Post object on success, null on failure. 56 56 */ 57 57 public function get_object_by_id( $post_id ) { -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php
r46586 r46985 47 47 * @param array|string $fields The context in which to relate the term to the object. 48 48 * 49 * @return int The term id.49 * @return int The term ID. 50 50 */ 51 51 public function update_object( $term, $fields ) { … … 59 59 60 60 /** 61 * Attach terms onthe given post.61 * Attach terms to the given post. 62 62 * 63 * @param int $post_id The Post ID.63 * @param int $post_id The post ID. 64 64 * @param string|array $terms An array of terms to set for the post, or a string of terms 65 65 * separated by commas. Hierarchical taxonomies must always pass IDs rather … … 77 77 78 78 /** 79 * Create a term and returns it as a object.79 * Create a term and returns it as an object. 80 80 * 81 81 * @param array $args Array or string of arguments for inserting a term. 82 82 * @param null $generation_definitions The default values. 83 83 * 84 * @return null|WP_Error|WP_TermWP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.84 * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure. 85 85 */ 86 86 public function create_and_get( $args = array(), $generation_definitions = null ) { … … 96 96 97 97 /** 98 * Retrieves the term by given term id.98 * Retrieves the term by a given ID. 99 99 * 100 * @param int $term_id The term idto retrieve.100 * @param int $term_id ID of the term to retrieve. 101 101 * 102 * @return null|WP_Error|WP_TermWP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.102 * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure. 103 103 */ 104 104 public function get_object_by_id( $term_id ) { -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php
r46830 r46985 34 34 * Updates an existing object. 35 35 * 36 * @param int $object The object id.36 * @param int $object The object ID. 37 37 * @param array $fields The values to update. 38 38 * … … 91 91 * Retrieves an object by ID. 92 92 * 93 * @param int $object_id The object id.93 * @param int $object_id The object ID. 94 94 * 95 95 * @return mixed The object. Can be anything. … … 115 115 116 116 /** 117 * Combines the given argument with the generation_definitions (defaults) and applies117 * Combines the given arguments with the generation_definitions (defaults) and applies 118 118 * possibly set callbacks on it. 119 119 * -
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-user.php
r46586 r46985 27 27 * @param array $args The user data to insert. 28 28 * 29 * @return int|WP_Error 29 * @return int|WP_Error The user ID on success, WP_Error object on failure. 30 30 */ 31 31 public function create_object( $args ) { … … 36 36 * Updates the user data. 37 37 * 38 * @param int $user_id The user idto update.38 * @param int $user_id ID of the user to update. 39 39 * @param array $fields The user data to update. 40 40 * 41 * @return int|WP_Error User id on success. WP_Erroron failure.41 * @return int|WP_Error The user ID on success, WP_Error object on failure. 42 42 */ 43 43 public function update_object( $user_id, $fields ) { … … 47 47 48 48 /** 49 * Retrieves the user for given user id.49 * Retrieves the user for a given ID. 50 50 * 51 * @param int $user_id The user id to get.51 * @param int $user_id ID of the user ID to retrieve. 52 52 * 53 * @return WP_User The user .53 * @return WP_User The user object. 54 54 */ 55 55 public function get_object_by_id( $user_id ) {
Note: See TracChangeset
for help on using the changeset viewer.