diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index 5535679b69..b34d8e9e63 100644
|
a
|
b
|
function wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file ) { |
| 6114 | 6114 | * |
| 6115 | 6115 | * @since 2.1.0 |
| 6116 | 6116 | * |
| 6117 | | * @param int $attachment_id Attachment post ID. Defaults to global $post. |
| | 6117 | * @param int $attachment_id Attachment post ID. Default 0. |
| 6118 | 6118 | * @param bool $unfiltered Optional. If true, filters are not run. Default false. |
| 6119 | 6119 | * @return array|false { |
| 6120 | 6120 | * Attachment metadata. False on failure. |
| … |
… |
function wp_delete_attachment_files( $post_id, $meta, $backup_sizes, $file ) { |
| 6130 | 6130 | function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) { |
| 6131 | 6131 | $attachment_id = (int) $attachment_id; |
| 6132 | 6132 | |
| | 6133 | if ( ! $attachment_id ) { |
| | 6134 | $post = get_post(); |
| | 6135 | |
| | 6136 | if ( ! $post ) { |
| | 6137 | return false; |
| | 6138 | } |
| | 6139 | |
| | 6140 | $attachment_id = $post->ID; |
| | 6141 | } |
| | 6142 | |
| 6133 | 6143 | $data = get_post_meta( $attachment_id, '_wp_attachment_metadata', true ); |
| 6134 | 6144 | |
| 6135 | 6145 | if ( ! $data ) { |