Post Formats: Don't assign a variable inside `if` statement in `get_post_format()`.
Props Mirucon. Fixes #44840. Built from https://develop.svn.wordpress.org/trunk@43592 git-svn-id: http://core.svn.wordpress.org/trunk@43421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dafee9fae6
commit
810b1333ff
|
@ -15,7 +15,9 @@
|
|||
* @return string|false The format if successful. False otherwise.
|
||||
*/
|
||||
function get_post_format( $post = null ) {
|
||||
if ( ! $post = get_post( $post ) ) {
|
||||
$post = get_post( $post );
|
||||
|
||||
if ( ! $post ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -67,7 +69,7 @@ function has_post_format( $format = array(), $post = null ) {
|
|||
function set_post_format( $post, $format ) {
|
||||
$post = get_post( $post );
|
||||
|
||||
if ( empty( $post ) ) {
|
||||
if ( ! $post ) {
|
||||
return new WP_Error( 'invalid_post', __( 'Invalid post.' ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43591';
|
||||
$wp_version = '5.0-alpha-43592';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue