'', 'settings' => '', 'plus' => '', 'users' => '', 'user-plus' => '', 'upload' => '', 'download' => '', 'file-text' => '', 'list' => '', 'grid' => '', 'copy' => '', 'chevron-l' => '', 'chevron-d' => '', 'calendar' => '', 'building' => '', 'briefcase' => '', 'activity' => '', 'mail' => '', 'bell' => '', 'target' => '', 'shield' => '', 'clock' => '', 'eye' => '', 'inbox' => '', 'database' => '', 'smile' => '', 'check' => '', 'trash' => '', 'pencil' => '', 'external' => '', 'shopping-bag' => '', 'home' => '', 'key' => '', 'heart' => '', 'refresh' => '', 'star' => '', 'zap' => '', 'sun' => '', 'sparkles' => '', 'more' => '', 'user' => '', 'chart' => '', 'columns' => '', 'route' => '', 'filter' => '', 'trending' => '', 'layers' => '', 'sliders' => '', 'phone' => '', 'message' => '', 'check-square' => '', 'chevron-r' => '', 'menu' => '', 'log-out' => '', 'copy-x' => '', 'flame' => '', 'x' => '', ); /** * An icon as inline SVG (decorative: hidden from screen readers). * * @param string $name Icon name. * @param int $size Pixels. */ public static function svg( $name, $size = 16 ) { if ( ! isset( self::PATHS[ $name ] ) ) { return ''; } return ''; } /** Allowed markup for wp_kses() when an icon is part of a larger string. */ public static function kses() { $shape = array( 'd' => true, 'cx' => true, 'cy' => true, 'r' => true, 'rx' => true, 'ry' => true, 'x' => true, 'y' => true, 'width' => true, 'height' => true, ); return array( 'svg' => array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'fill' => true, 'stroke' => true, 'stroke-width' => true, 'stroke-linecap' => true, 'stroke-linejoin' => true, 'aria-hidden' => true, 'focusable' => true, ), 'path' => $shape, 'circle' => $shape, 'rect' => $shape, 'ellipse' => $shape, ); } /** Echo an icon. */ public static function e( $name, $size = 16 ) { echo wp_kses( self::svg( $name, $size ), self::kses() ); } }