mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 18:48:18 +01:00
Coding Standards: Use strict comparison in wp-admin/includes/class-wp-site-icon.php
.
Follow-up to [32994], [35299]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c2f262971c
commit
588d9a85ff
@ -201,9 +201,9 @@ class WP_Site_Icon {
|
||||
* @param int $post_id Attachment ID.
|
||||
*/
|
||||
public function delete_attachment_data( $post_id ) {
|
||||
$site_icon_id = get_option( 'site_icon' );
|
||||
$site_icon_id = (int) get_option( 'site_icon' );
|
||||
|
||||
if ( $site_icon_id && $post_id == $site_icon_id ) {
|
||||
if ( $site_icon_id && $post_id === $site_icon_id ) {
|
||||
delete_option( 'site_icon' );
|
||||
}
|
||||
}
|
||||
@ -222,9 +222,9 @@ class WP_Site_Icon {
|
||||
*/
|
||||
public function get_post_metadata( $value, $post_id, $meta_key, $single ) {
|
||||
if ( $single && '_wp_attachment_backup_sizes' === $meta_key ) {
|
||||
$site_icon_id = get_option( 'site_icon' );
|
||||
$site_icon_id = (int) get_option( 'site_icon' );
|
||||
|
||||
if ( $post_id == $site_icon_id ) {
|
||||
if ( $post_id === $site_icon_id ) {
|
||||
add_filter( 'intermediate_image_sizes', array( $this, 'intermediate_image_sizes' ) );
|
||||
}
|
||||
}
|
||||
|
@ -956,7 +956,7 @@ function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) {
|
||||
$switched_blog = true;
|
||||
}
|
||||
|
||||
$site_icon_id = get_option( 'site_icon' );
|
||||
$site_icon_id = (int) get_option( 'site_icon' );
|
||||
|
||||
if ( $site_icon_id ) {
|
||||
if ( $size >= 512 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user