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
<?php | |
/** | |
* Add custom tabs. | |
* | |
* @param array $tabs Account tabs. | |
* @return array | |
*/ | |
function um_account_custom_tabs( $tabs ) { | |
$tabs[ 150 ][ 'custom_tab_01' ] = array( |
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
<?php | |
/** | |
* Shortcode that displays the profile header. | |
* Example: [um_profile_header form_id="7" user_id="1"] | |
* | |
* @global \wpdb $wpdb | |
* | |
* @param array $atts Shortcode attributes: | |
* - (int) form_id - profile form ID. The first profile form if blank. |
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
<?php | |
if ( ! function_exists( 'um_email_locate_template' ) ) { | |
/** | |
* Locate a template and return the path for inclusion. | |
*/ | |
function um_email_locate_template( $template_name ) { | |
$blog_id = is_multisite() ? '/' . get_current_blog_id() : ''; | |
$template = locate_template( |
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
<?php | |
/** | |
* Custom validation and error message for the "E-mail Address" field. | |
*/ | |
add_action( 'um_custom_field_validation_user_email_details', 'um_custom_validate_user_email_details', 999, 3 ); | |
function um_custom_validate_user_email_details( $key, $array, $args ) { | |
if ( $key == 'user_email' && isset( $args['user_email'] ) ) { | |
if ( isset( UM()->form()->errors['user_email'] ) ) { | |
unset( UM()->form()->errors['user_email'] ); |
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
// Don't send private messages on the "Enter" keypress. | |
jQuery(document).ready(function() { | |
jQuery( document.body ).off( 'keypress', 'textarea.um_message_text' ); | |
}); |
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
<?php | |
/** | |
* Hook: um_login_redirect_url | |
* | |
* Type: filter | |
* | |
* Description: Change redirect URL after successful login. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-login.php#L258 |
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
<?php | |
/** | |
* Hook: um_after_everything_output | |
* | |
* Type: action | |
* | |
* Description: Fires after the form shortcode is loaded. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-shortcodes.php#L819 |
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
<?php | |
/** | |
* Hook: um_after_form | |
* | |
* Type: action | |
* | |
* Description: Fires before the closing tag in the form. | |
* May be used to display custom content in the form footer. | |
* |