I found this action hook in wp-login.php file. It says it can be used to create custom actions to the wp-login. However, as I’m new to WP coding and PHP, I do not understand how {action} can work even though it is under double quotations? Here is the action hook:

do_action( "login_form_{$action}" );

In the plugin that I’m following, this action hook is added by this:

add_action( 'login_form_login', array( $this, 'redirect_to_custom_login' ));

How does login_form_login matches and replaces login_form_{action} ?

Read more here: Action login_form_{action} working


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: