Avoid warning in gallery_shortcode() when called outside of post context.
Props kovshenin fixes #24272 git-svn-id: http://core.svn.wordpress.org/trunk@24198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a32b397f42
commit
bb51b4e239
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue