Avoid warning in gallery_shortcode() when called outside of post context.

Props kovshenin
fixes #24272


git-svn-id: https://develop.svn.wordpress.org/trunk@24198 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2013-05-08 16:57:58 +00:00
parent c1d41fdd37
commit edee280e39
1 changed files with 1 additions and 1 deletions

View File

@ -697,7 +697,7 @@ function gallery_shortcode($attr) {
extract(shortcode_atts(array(
'order' => 'ASC',
'orderby' => 'menu_order ID',
'id' => $post->ID,
'id' => $post ? $post->ID : 0,
'itemtag' => 'dl',
'icontag' => 'dt',
'captiontag' => 'dd',