Use get_post_format() instead of assuming we already have it.

* Fixes an issue where image posts without a title could not be deleted

fixes #23887. see #24046. props WraithKenny, SergeyBiryukov.

git-svn-id: http://core.svn.wordpress.org/trunk@24015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Twelve: fix style element ID attribute value, props SergeyBiryukov. Closes #24033.

git-svn-id: http://core.svn.wordpress.org/trunk@24016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use attachment.url only if it is available, else fall back to props.url.

see #24046. see [24009].

git-svn-id: http://core.svn.wordpress.org/trunk@24017 1a063a9b-81f0-0310-95a4-ce76da25c4cd