source on its own array key, without adding the * both `width` and `height` attributes, since these are added dnamically, * before rendering the SVG code. * * All icons are assumed to have equal width and height, hence the option * to only specify a `$size` parameter in the svg methods. * * @package Default_Small_Business_Theme */ class Default_Small_Business_Theme_SVG_Icons { /** * Gets the SVG code for a given icon. */ public static function get_svg( $group, $icon, $size ) { if ( 'ui' == $group ) { $arr = self::$ui_icons; } else if ( 'social' == $group ) { $arr = self::$social_icons; } else { $arr = array(); } if ( array_key_exists( $icon, $arr ) ) { $repl = sprintf( '\s*<', $svg ); // Remove white space between SVG tags. return $svg; } return null; } /** * User Interface icons – svg sources. */ static $ui_icons = array( 'more_horiz' => /* material-design – more_horiz */ ' ', 'expand_more' => /* material-design – expand_more */ ' ', 'link' => /* material-design – link */ ' ', 'watch' => /* material-design – watch-later */ ' ', 'archive' => /* material-design – folder */ ' ', 'comment' => /* material-design – comment */ ' ', 'person' => /* material-design – person */ ' ', 'edit' => /* material-design – edit */ ' ', 'chevron_left' => /* material-design – chevron_left */ ' ', 'chevron_right' => /* material-design – chevron_right */ ' ', 'check' => /* material-design – check */ ' ', ); }