Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php

    r47020 r47122  
    3333                $repl = '<svg class="svg-icon" aria-hidden="true" role="img" focusable="false" ';
    3434                $svg  = preg_replace( '/^<svg /', $repl, trim( $arr[ $icon ] ) ); // Add extra attributes to SVG code.
    35                 $svg  = str_replace( '#1A1A1B', $color, $svg ); // Replace the color.
    36                 $svg  = str_replace( '#', '%23', $svg ); // Urlencode hashes.
     35                $svg  = str_replace( '#1A1A1B', $color, $svg );   // Replace the color.
     36                $svg  = str_replace( '#', '%23', $svg );          // Urlencode hashes.
    3737                $svg  = preg_replace( "/([\n\t]+)/", ' ', $svg ); // Remove newlines & tabs.
    38                 $svg  = preg_replace( '/>\s*</', '><', $svg ); // Remove white space between SVG tags.
     38                $svg  = preg_replace( '/>\s*</', '><', $svg );    // Remove whitespace between SVG tags.
    3939                return $svg;
    4040            }
Note: See TracChangeset for help on using the changeset viewer.