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

View File

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