Don't obliterate $title if $desc isn't set. Props kawauso. Fixes #18185.
git-svn-id: https://develop.svn.wordpress.org/trunk@18698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1bc9770151
commit
73744eb96c
|
@ -274,7 +274,8 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data =
|
|||
$content = $image_meta['caption'];
|
||||
}
|
||||
|
||||
$title = isset($desc) ? $desc : '';
|
||||
if ( isset( $desc ) )
|
||||
$title = $desc;
|
||||
|
||||
// Construct the attachment array
|
||||
$attachment = array_merge( array(
|
||||
|
|
Loading…
Reference in New Issue