This file contains 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 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 the ability to pan and zoom the map. | |
*/ | |
add_action( 'wp_footer', function () { | |
?><script type="text/javascript"> | |
function um_user_locations_customize_02 ( args, hash, directory ) { | |
args.zoom = 4; |
This file contains 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 a button to the member profile that an admin can click so they are redirected to the private content of the relevant member | |
* @author Ultimate Member support <[email protected]> | |
* @since 2022-03-17 | |
* @see #59138 | |
*/ | |
add_action( 'um_profile_content_private_content', function( $args ) { | |
if ( is_user_logged_in() && current_user_can( 'administrator' ) && current_user_can( 'edit_user', um_profile_id() ) ) { |
This file contains 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 | |
/** | |
* Redirection after profile is completed | |
* Add this code to the file functions.php in the active theme directory. | |
*/ | |
add_filter( 'um_profile_completeness_complete_profile_redirect', function( $redirect, $user_id, $result ) { | |
if ( is_array( $result ) && absint( $result['progress'] ) >= absint( $result['req_progress'] ) ) { | |
$redirect = home_url(); |
This file contains 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 | |
/** | |
* Prevent members from being able to see themselves in the member directory. | |
* Add this code to the file functions.php in the active theme directory. | |
*/ | |
function um_pre_users_query_notme( $directory ) { | |
if ( is_user_logged_in() ) { | |
$directory->where_clauses[] = 'u.ID != ' . get_current_user_id(); |
This file contains 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 job's company logo size. Get rid of the cropped square logo. Use true logo image ratio. | |
* Add this code to the file functions.php in the active theme directory. | |
*/ | |
/** | |
* Change the company logo size. | |
* |
This file contains 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
/** | |
* Hide error messages under fields. | |
*/ | |
.um-field .um-field-error { | |
display: none; | |
} |
This file contains 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
/** | |
* A code snippet that triggers the "resize" once the popup is open. | |
* Add this code to your custom JS file. | |
*/ | |
jQuery( '.elementor-button[href^="#elementor-action"]' ).on( 'click', function () { | |
setTimeout( function() { | |
jQuery( window ).trigger( 'resize' ); | |
}, 100 ); | |
} ); |
This file contains 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 this code to the file functions.php in the active theme directory. | |
*/ | |
add_filter( 'wp_sitemaps_max_urls', 'um_sitemaps_users_max_urls', 10, 2 ); | |
add_filter( 'wp_sitemaps_users_pre_max_num_pages', 'um_sitemaps_users_max_num_pages', 10, 1 ); | |
add_filter( 'wp_sitemaps_users_pre_url_list', 'um_sitemaps_users_get_url_list', 10, 2 ); |
This file contains 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
/** | |
* Re-initialize dropdown functionality. | |
* Add this code to your custom JS file. | |
*/ | |
jQuery( function () { | |
/** | |
* Verifies that there is no empty value. | |
*/ | |
function unselectEmptyOption( e ) { |
OlderNewer