'', 'title' => '', 'desc' => '', 'class' => 'svgicon', 'base' => 'icon', 'fallback' => false, ) ); $args = (array) apply_filters( 'wmhook_receptar_svg_get_args', $args ); $aria_hidden = ' aria-hidden="true"'; $aria_labelledby = ''; /** * This theme doesn't use the SVG title or description attributes; non-decorative icons are described with .screen-reader-text. * * However, child themes can use the title and description to add information to non-decorative SVG icons to improve accessibility. * * Example 1 with title: 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ) ) ); ?> * * Example 2 with title and description: 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ), 'desc' => __( 'This is the description', 'textdomain' ) ) ); ?> * * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/. */ if ( $args['title'] ) { $aria_hidden = ''; $unique_id = uniqid(); $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"'; if ( $args['desc'] ) { $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"'; } } // Processing $output[10] = ''; if ( $args['title'] ) { $output[15] = '' . esc_html( $args['title'] ) . ''; if ( $args['desc'] ) { $output[16] = '' . esc_html( $args['desc'] ) . ''; } } /** * Display the icon. * * The whitespace around `` is intentional - it is a work around to a keyboard navigation bug in Safari 10. * * See https://core.trac.wordpress.org/ticket/38387. * See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href. */ $output[20] = ' '; // Add some markup to use as a fallback for browsers that do not support SVGs if ( $args['fallback'] ) { $output[25] = ''; } $output[30] = ''; $output = (array) apply_filters( 'wmhook_receptar_svg_get_output', $output, $args ); ksort( $output ); // Output return implode( '', $output ); } // /get /** * 100) Helpers */ /** * Get social links icons setup array. * * Array key = a part of link URL. * Array value = a part SVG symbol ID. * * @since 1.6.0 * @version 1.6.0 */ public static function get_social_icons() { // Output return (array) apply_filters( 'wmhook_receptar_svg_get_social_icons', array() ); } // /get_social_icons } // /Receptar_SVG add_action( 'after_setup_theme', 'Receptar_SVG::init' );