Changeset 47122 for trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php
r47020 r47122 33 33 $repl = '<svg class="svg-icon" aria-hidden="true" role="img" focusable="false" '; 34 34 $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. 37 37 $svg = preg_replace( "/([\n\t]+)/", ' ', $svg ); // Remove newlines & tabs. 38 $svg = preg_replace( '/>\s*</', '><', $svg ); // Remove whitespace between SVG tags.38 $svg = preg_replace( '/>\s*</', '><', $svg ); // Remove whitespace between SVG tags. 39 39 return $svg; 40 40 }
Note: See TracChangeset
for help on using the changeset viewer.