Fork me on GitHub

next_ad_int

loaded

next_ad_int_loaded() : void

since 2.1.8 Is called after NADI is loaded and has registered any hooks.

Description

You can remove any of NADI's registered hook after this action has been called. To remove e.g. the link "Log in with SSO" link from the log in form, you can write your own hook:

add_action('next_ad_int_loaded', 'my_sso_link_removal_action');
 
function my_sso_link_removal_action() {
	remove_action('login_form', array(next_ad_int()->getSsoPage(), 'generateLoginFooter'), 1);
}

loaded

next_ad_int_register_form_login_services() : void

since 2.1.9 (ADI-687) Is called to register the handler for form-based authentication. This action is automatically added when the user is on WordPress' default login page or a custom login page

Description

In case of having your own login form for any 3rd party theme or library, you can register the form-based handler and trigger the authentication:

// register form-based handler; if it is already registered, it won't be registered again
do_action('next_ad_int_register_form_login_services');

// trigger form-based authentication
apply_filters('authenticate', null, $_POST['my_username_field'], $_POST['my_password_field']);