Make get_attachment_metadata() loop safe.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c40e204b6c
commit
01389755c7
|
@ -3536,7 +3536,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) {
|
||||||
* @param bool $unfiltered Optional, default is false. If true, filters are not run.
|
* @param bool $unfiltered Optional, default is false. If true, filters are not run.
|
||||||
* @return string|bool Attachment meta field. False on failure.
|
* @return string|bool Attachment meta field. False on failure.
|
||||||
*/
|
*/
|
||||||
function wp_get_attachment_metadata( $post_id, $unfiltered = false ) {
|
function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) {
|
||||||
$post_id = (int) $post_id;
|
$post_id = (int) $post_id;
|
||||||
if ( !$post =& get_post( $post_id ) )
|
if ( !$post =& get_post( $post_id ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue