Skip to content

Commit 4e96d75

Browse files
Docs: Clarify description for ::create_upload_object in the attachment test factory.
Follow-up to [34855], [44497]. See #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60289 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 75f4a09 commit 4e96d75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ public function create_object( $args, $legacy_parent = 0, $legacy_args = array()
5050
}
5151

5252
/**
53-
* Saves an attachment.
53+
* Saves a file as an attachment.
5454
*
5555
* @since 4.4.0
5656
* @since 6.2.0 Returns a WP_Error object on failure.
5757
*
58-
* @param string $file The file name to create attachment object for.
58+
* @param string $file Full path to the file to create an attachment object for.
59+
* The name of the file will be used as the attachment name.
5960
* @param int $parent_post_id ID of the post to attach the file to.
6061
*
6162
* @return int|WP_Error The attachment ID on success, WP_Error object on failure.

0 commit comments

Comments
 (0)