Changeset 44785 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 03/01/2019 08:57:26 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r44309 r44785 115 115 } 116 116 117 $name = basename( $file['file'] );117 $name = wp_basename( $file['file'] ); 118 118 $name_parts = pathinfo( $name ); 119 119 $name = trim( substr( $name, 0, -( 1 + strlen( $name_parts['extension'] ) ) ) ); … … 144 144 145 145 if ( empty( $attachment->post_title ) ) { 146 $attachment->post_title = preg_replace( '/\.[^.]+$/', '', basename( $file ) );146 $attachment->post_title = preg_replace( '/\.[^.]+$/', '', wp_basename( $file ) ); 147 147 } 148 148
Note: See TracChangeset
for help on using the changeset viewer.