Make WordPress Core

Changeset 57859


Ignore:
Timestamp:
03/20/2024 12:47:47 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [3880].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/bookmark-template.php

    r55990 r57859  
    125125        $output .= $parsed_args['link_before'];
    126126
    127         if ( null != $bookmark->link_image && $parsed_args['show_images'] ) {
     127        if ( '' !== $bookmark->link_image && $parsed_args['show_images'] ) {
    128128            if ( str_starts_with( $bookmark->link_image, 'http' ) ) {
    129                 $output .= "<img src=\"$bookmark->link_image\" $alt $title />";
     129                $output .= '<img src="' . $bookmark->link_image . '"' . $alt . $title . ' />';
    130130            } else { // If it's a relative path.
    131                 $output .= '<img src="' . get_option( 'siteurl' ) . "$bookmark->link_image\" $alt $title />";
     131                $output .= '<img src="' . get_option( 'siteurl' ) . $bookmark->link_image . '"' . $alt . $title . ' />';
    132132            }
    133133            if ( $parsed_args['show_name'] ) {
  • trunk/src/wp-includes/deprecated.php

    r57687 r57859  
    997997        $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
    998998
    999         if ( $row->link_image != null && $show_images ) {
     999        if ( '' != $row->link_image && $show_images ) {
    10001000            if ( str_contains( $row->link_image, 'http' ) )
    1001                 $output .= "<img src=\"$row->link_image\" $alt $title />";
     1001                $output .= '<img src="' . $row->link_image . '"' . $alt . $title . ' />';
    10021002            else // If it's a relative path.
    1003                 $output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
     1003                $output .= '<img src="' . get_option('siteurl') . $row->link_image . '"' . $alt . $title . ' />';
    10041004        } else {
    10051005            $output .= $name;
Note: See TracChangeset for help on using the changeset viewer.