Widget Generation Developer API

WSL Widget is generated by the function wsl_render_auth_widget() defined in /includes/widgets/wsl.auth.widgets.php. This function come with few actions and filters that you may use to customize the widget even further.

To simplify things, we broke the process to this simple timeline of events:


Legend : action — filter.

  • wsl_render_auth_widget()

    Generate the HTML content of WSL Widget

    This function will start by checking if the user if already connected and if authentication are allowed through bouncer settings.

    Note: Prior to 2.2.3, this function was called wsl_render_login_form().

  • wsl_render_auth_widget_start

    This action runs just at the start of wsl_render_auth_widget(). You may use this hook to prepend HTML content to the widget.

  • wsl_render_auth_widget_alter_assets_base_url

    Reset the base url to the assets folder (where the default providers icons are stored).

  • wsl_render_auth_widget_alter_connect_with_label

    Reset the Connect with caption set in the Widget tab > Basic Settings.

  • wsl_render_auth_widget_alter_widget_css

    Reset the widget css.


  • For each enabled provider Do

    Iterate over the supported providers array in order to generate the icon of each enabled provider.

  • wsl_render_auth_widget_alter_authenticate_url

    Reset the authentication url for the current provider in loop. This url is what will trigger the Authentication Process.

  • wsl_render_auth_widget_alter_provider_icon_markup

    Reset (overwrite) the current provider icon (button). For usage, refer to Code Snippets.


  • wsl_render_auth_widget_end

    This action runs just at the end of wsl_render_auth_widget(). You may use this hook to append HTML content to the widget.



Please, do not submit issues here.

This comment section is for a general question and feedback. If you want to report a bug, please refer to the Support section.