Make $post_id argument optional for _post_formats_title(). props kovshenin. fixes #24233. see #24011.

git-svn-id: http://core.svn.wordpress.org/trunk@24146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-04-30 23:48:18 +00:00
parent 3066066fae
commit 4705c96648

View File

@ -949,8 +949,8 @@ function the_remaining_content( $more_link_text = null, $strip_teaser = false )
* @since 3.6.0
* @access private
*/
function _post_formats_title( $title, $post_id ) {
if ( is_admin() || is_feed() || ! in_array( get_post_format( $post_id ), array( 'aside', 'status' ) ) )
function _post_formats_title( $title, $post_id = 0 ) {
if ( ! $post_id || is_admin() || is_feed() || ! in_array( get_post_format( $post_id ), array( 'aside', 'status' ) ) )
return $title;
// Return an empty string only if the title is auto-generated.