Coding Standards: Use strict comparison in `wp-includes/widgets/class-wp-widget-rss.php`.
Props mukesh27. Fixes #50125. Built from https://develop.svn.wordpress.org/trunk@47774 git-svn-id: http://core.svn.wordpress.org/trunk@47550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33194d29c2
commit
43a6aff0d4
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-47772';
|
$wp_version = '5.5-alpha-47774';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -48,7 +48,7 @@ class WP_Widget_RSS extends WP_Widget {
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
|
$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
|
||||||
while ( stristr( $url, 'http' ) != $url ) {
|
while ( stristr( $url, 'http' ) !== $url ) {
|
||||||
$url = substr( $url, 1 );
|
$url = substr( $url, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class WP_Widget_RSS extends WP_Widget {
|
||||||
$title = strip_tags( $rss->get_title() );
|
$title = strip_tags( $rss->get_title() );
|
||||||
}
|
}
|
||||||
$link = strip_tags( $rss->get_permalink() );
|
$link = strip_tags( $rss->get_permalink() );
|
||||||
while ( stristr( $link, 'http' ) != $link ) {
|
while ( stristr( $link, 'http' ) !== $link ) {
|
||||||
$link = substr( $link, 1 );
|
$link = substr( $link, 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ class WP_Widget_RSS extends WP_Widget {
|
||||||
* @return array Updated settings to save.
|
* @return array Updated settings to save.
|
||||||
*/
|
*/
|
||||||
public function update( $new_instance, $old_instance ) {
|
public function update( $new_instance, $old_instance ) {
|
||||||
$testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) );
|
$testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] !== $old_instance['url'] ) ) );
|
||||||
return wp_widget_rss_process( $new_instance, $testurl );
|
return wp_widget_rss_process( $new_instance, $testurl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue