mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 18:48:18 +01:00
Coding Standards: Use strict comparison in wp-includes/revision.php
.
Follow-up to [24414], [38118], [38433]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56359 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
72c9909999
commit
847328068d
@ -768,7 +768,7 @@ function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
|
||||
return $terms;
|
||||
}
|
||||
|
||||
if ( empty( $_REQUEST['post_format'] ) || $post->ID != $post_id
|
||||
if ( empty( $_REQUEST['post_format'] ) || $post->ID !== $post_id
|
||||
|| 'post_format' !== $taxonomy || 'revision' === $post->post_type
|
||||
) {
|
||||
return $terms;
|
||||
@ -778,6 +778,7 @@ function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
|
||||
$terms = array();
|
||||
} else {
|
||||
$term = get_term_by( 'slug', 'post-format-' . sanitize_key( $_REQUEST['post_format'] ), 'post_format' );
|
||||
|
||||
if ( $term ) {
|
||||
$terms = array( $term ); // Can only have one post format.
|
||||
}
|
||||
@ -804,13 +805,10 @@ function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if ( empty( $_REQUEST['_thumbnail_id'] ) ||
|
||||
empty( $_REQUEST['preview_id'] ) ||
|
||||
$post->ID != $post_id ||
|
||||
'_thumbnail_id' !== $meta_key ||
|
||||
'revision' === $post->post_type ||
|
||||
$post_id != $_REQUEST['preview_id'] ) {
|
||||
|
||||
if ( empty( $_REQUEST['_thumbnail_id'] ) || empty( $_REQUEST['preview_id'] )
|
||||
|| $post->ID !== $post_id || $post_id !== (int) $_REQUEST['preview_id']
|
||||
|| '_thumbnail_id' !== $meta_key || 'revision' === $post->post_type
|
||||
) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user