wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php:31Gets the SVG code for a given icon.
$groupstring$iconstring$sizeint public static function get_svg( $group, $icon, $size ) { if ( 'ui' === $group ) { $arr = self::$ui_icons; } elseif ( 'social' === $group ) { $arr = self::$social_icons; } else { $arr = array(); } if ( array_key_exists( $icon, $arr ) ) { $repl = sprintf( '<svg class="svg-icon" width="%d" height="%d" aria-hidden="true" role="img" focusable="false" ', $size, $size ); $svg = preg_replace( '/^<svg /', $repl, trim( $arr[ $icon ] ) ); // Add extra attributes to SVG code. $svg = preg_replace( "/([\n\t]+)/", ' ', $svg ); // Remove newlines & tabs. $svg = preg_replace( '/>\s*</', '><', $svg ); // Remove whitespace between SVG tags. return $svg; } return null; }One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
none to string|null.verified against sourcesrc/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.