Removing Action Links

There are now a few different methods of removing action links. We will outline them below.

Removing Links From All Forms

In order to remove a specific action link from ALL forms, consider the following code:

function remove_register_from_tml_forms( $action ) {
	if ( 'register' == $action ) {
		tml_get_action( 'register' )->show_on_forms = false;
	}
}
add_action( 'tml_registered_action', 'remove_register_from_tml_forms' );

Removing Links From Specific Forms

In order to remove a specific action link from a specific form, consider the following code:

function remove_register_from_tml_login_form( $form ) {
	if ( 'login' == $form ) {
		tml_get_form( 'login' )->remove_link( 'register' );
	}
}
add_action( 'tml_registered_form', 'remove_register_from_tml_login_form' );