Created
September 7, 2022 22:14
-
-
Save nikitasinelnikov/2aef2b48c12d8cf24fd703867f2ce8ab to your computer and use it in GitHub Desktop.
Ultimate Member v3: Password Reset 'shortcode_atts_ultimatemember_password' hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 'um_reset_password_shortcode_args_filter' - use 'shortcode_atts_ultimatemember_password' filter's hook | |
/** | |
* Description: Extend the password reset form arguments. | |
* This hook may be used to select custom template file or change the password reset form alignment and width. | |
* Legacy v2.x hooks: 'um_reset_password_shortcode_args_filter' | |
* | |
* Hook: shortcode_atts_ultimatemember_password | |
* Type: filter | |
* | |
* @package um\core | |
* @since 3.0.0 | |
* | |
* @param array $args Password reset form shortcode arguments. | |
* - template (string) - Deprecated. | |
* - mode (string) - Deprecated. | |
* - form_id (string) - Deprecated. | |
* - max_width (string) - Form width. Default '450px'. | |
* - align (string) - Form alignment. Default 'center'. | |
* | |
* @return array Password reset form shortcode arguments. | |
*/ | |
function my_reset_password_shortcode_args( $args ) { | |
// How to change the form alignment. | |
$args['align'] = 'left'; | |
// How to change the form width. | |
$args['max_width'] = '600px'; | |
return $args; | |
} | |
add_filter( 'shortcode_atts_ultimatemember_password', 'my_reset_password_shortcode_args', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment