Ensure that wp.media.view.settings.post is set before accessing the post's id

Avoids JS error in cases where media-editor is loaded individually
instead of with the whole `wp_enqueue_media()` process.

fixes #27836. props nacin
Built from https://develop.svn.wordpress.org/trunk@28149


git-svn-id: http://core.svn.wordpress.org/trunk@27980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2014-04-16 15:26:15 +00:00
parent dd8531a3b3
commit b9eb0f72e3
2 changed files with 2 additions and 2 deletions

View File

@ -535,7 +535,7 @@
link: 'post',
size: 'thumbnail',
order: 'ASC',
id: wp.media.view.settings.post.id,
id: wp.media.view.settings.post && wp.media.view.settings.post.id,
orderby : 'menu_order ID'
}
});

File diff suppressed because one or more lines are too long