Coding Standards: Use strict comparison in wp-includes/bookmark-template.php.

Follow-up to [3880].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@57859


git-svn-id: http://core.svn.wordpress.org/trunk@57360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-03-20 12:49:10 +00:00
parent 31039a896f
commit 37ce09349a
3 changed files with 7 additions and 7 deletions

View File

@ -124,11 +124,11 @@ function _walk_bookmarks( $bookmarks, $args = '' ) {
$output .= $parsed_args['link_before'];
if ( null != $bookmark->link_image && $parsed_args['show_images'] ) {
if ( '' !== $bookmark->link_image && $parsed_args['show_images'] ) {
if ( str_starts_with( $bookmark->link_image, 'http' ) ) {
$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
$output .= '<img src="' . $bookmark->link_image . '"' . $alt . $title . ' />';
} else { // If it's a relative path.
$output .= '<img src="' . get_option( 'siteurl' ) . "$bookmark->link_image\" $alt $title />";
$output .= '<img src="' . get_option( 'siteurl' ) . $bookmark->link_image . '"' . $alt . $title . ' />';
}
if ( $parsed_args['show_name'] ) {
$output .= " $name";

View File

@ -996,11 +996,11 @@ function get_links($category = -1, $before = '', $after = '<br />', $between = '
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
if ( $row->link_image != null && $show_images ) {
if ( '' != $row->link_image && $show_images ) {
if ( str_contains( $row->link_image, 'http' ) )
$output .= "<img src=\"$row->link_image\" $alt $title />";
$output .= '<img src="' . $row->link_image . '"' . $alt . $title . ' />';
else // If it's a relative path.
$output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
$output .= '<img src="' . get_option('siteurl') . $row->link_image . '"' . $alt . $title . ' />';
} else {
$output .= $name;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-57858';
$wp_version = '6.6-alpha-57859';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.