Prevent a PHP Warning for $post_format.

props MZAWeb, kovshenin. see #24011.

git-svn-id: https://develop.svn.wordpress.org/trunk@24094 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2013-04-25 08:02:38 +00:00
parent 116b530bb3
commit 6a6c0fb522
1 changed files with 1 additions and 0 deletions

View File

@ -992,6 +992,7 @@ function _post_formats_fix_empty_title( $data, $postarr ) {
return $data;
$post_id = ( isset( $postarr['ID'] ) ) ? absint( $postarr['ID'] ) : 0;
$post_format = '';
if ( $post_id )
$post_format = get_post_format( $post_id );