For the complete documentation index, see llms.txt. This page is also available as Markdown.

weglot_render_switcher_editor_button

This filter allow you to modifiy the translated content after the custom switcher is added.

The filter receives the translated page HTML (a string) once the custom switchers have been added, and must return it.

add_filter( 'weglot_render_switcher_editor_button', 'custom_weglot_render_switcher_editor_button' );
function custom_weglot_render_switcher_editor_button( $html ) {
    // Edit the HTML here.
    return $html;
}

Last updated