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 all approved users whose Ultimate Member profiles are public to the sitemap. | |
| */ | |
| add_filter( 'wpseo_sitemap_entry', 'um_wpseo_sitemap_entry', 10, 3 ); | |
| add_filter( 'wpseo_sitemap_exclude_author', 'um_wpseo_sitemaps_users' ); | |
| /** |
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 | |
| /** | |
| * Use Map ID to customize the user location map. | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| function um_user_locations_customize_mapId( args, hash, directory ) { | |
| args.mapId = 'YOUR_MAP_ID'; |
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 | |
| /** | |
| * Change the map marker title and image. | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| wp.hooks.addFilter('um_user_locations_marker_data', 'um_user_locations', function (marker_data, hash, userdata) { | |
| // Change the map marker title. |
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 | |
| /** | |
| * Disable Clustering | |
| */ | |
| add_action( 'wp_footer', function () { | |
| ?><script type="text/javascript"> | |
| wp.hooks.addFilter( 'um_member_directory_disable_clustering', 'um_user_locations', function ( disableClustering, directory ) { | |
| disableClustering = true; | |
| return disableClustering; |
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 | |
| /** | |
| * Builds the profile header shortcode output. | |
| * | |
| * The supported attributes for the shortcode are 'form_id', 'user_id'. | |
| * Example 1: [um_profile_header] | |
| * Example 2: [um_profile_header form_id="7" user_id="1"] | |
| * Example 3: [um_profile_header form_id="7" user_id="get_current_user_id"] | |
| * |
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 email template "Verified Users - Account is not verified". | |
| * | |
| * @param array $emails Emails list. | |
| * @return array | |
| */ | |
| function um_email_notification_unverify_user( $emails ) { |
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'] ); |