Hi there,
For the desktop one, you can do this:
add_filter( 'generate_off_canvas_toggle_output', function() {
if ( ! function_exists( 'generate_menu_plus_get_defaults' ) ) {
return;
}
$settings = wp_parse_args(
get_option( 'generate_menu_plus_settings', array() ),
generate_menu_plus_get_defaults()
);
$svg_icon = '';
if ( function_exists( 'generate_get_svg_icon' ) ) {
$svg_icon = generate_get_svg_icon( 'pro-menu-bars' );
}
return sprintf(
'<li class="slideout-toggle menu-item-align-right %2$s"><a aria-label="Open the menu" href="#">%1$s%3$s</a></li>',
$svg_icon,
$svg_icon ? 'has-svg-icon' : '',
'' !== $settings['off_canvas_desktop_toggle_label'] ? '<span class="off-canvas-toggle-label">' . wp_kses_post( $settings['off_canvas_desktop_toggle_label'] ) . '</span>' : ''
);
} );
The mobile toggle doesn’t have a filter at the moment, unfortunately. However, it does have a screen-reader-text
element so screen readers can identify it.