' ', 'moon' => ' ', 'sun' => '', 'search' => ' ', 'comment' => ' ', 'time' => ' ', 'author' => ' ' ); // Define allowed SVG tags and attributes $svg_args = array( 'svg' => array( 'class' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'xmlns' => true, 'fill' => true, 'style' => true, ), 'path' => array( 'd' => true, 'fill' => true, 'fill-rule' => true, 'clip-rule' => true, ), ); // Get the icon if it exists, otherwise return the menu-bar icon $icon = isset($icons[$icon_name]) ? $icons[$icon_name] : $icons['menu-bar']; // Return the sanitized SVG icon echo wp_kses($icon, $svg_args); }