Changeset 44903 for trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php
- Timestamp:
- 03/15/2019 12:15:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-attachment.php
r44785 r44903 17 17 * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure. 18 18 */ 19 function create_object( $args, $legacy_parent = 0, $legacy_args = array() ) {19 public function create_object( $args, $legacy_parent = 0, $legacy_args = array() ) { 20 20 // Backward compatibility for legacy argument format. 21 21 if ( is_string( $args ) ) { … … 45 45 * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure. 46 46 */ 47 function create_upload_object( $file, $parent = 0 ) {47 public function create_upload_object( $file, $parent = 0 ) { 48 48 $contents = file_get_contents( $file ); 49 49 $upload = wp_upload_bits( wp_basename( $file ), null, $contents );
Note: See TracChangeset
for help on using the changeset viewer.