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 <support@ultimatemember.com> | |
* @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 | |
/** | |
* 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 | |
/** | |
* 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
/** | |
* 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 | |
/** | |
* Description: Fires before the password reset form shortcode is loaded. | |
* | |
* Hook: um_before_password_form_is_loaded | |
* | |
* Type: action | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-password.php#LC239 |
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 | |
/** | |
* Use "Minimum Number" and "Maximum Number" options as the range filter limits. | |
* Add this code to the file functions.php in the active theme directory. | |
*/ | |
add_filter( 'um_member_directory_filter_slider_common', function( $range, $directory_data, $filter ) { | |
$field_data = UM()->fields()->get_field( $filter ); | |
if ( is_array( $field_data ) && isset( $field_data['min'] ) && isset( $field_data['max'] ) ) { |
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 | |
/** | |
* When users register on the main site they will be added to all subsites. | |
* | |
* @param int $user_id User ID. | |
* @param array $args Form data. | |
*/ | |
function um_add_user_to_all_blogs( $user_id, $args ) { |
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
/* member directory grid with 4 columns */ | |
.um-directory:not(.uimob340):not(.uimob500):not(.uimob800):not(.uimob960) .um-members-wrapper .um-members.um-members-grid .um-member { | |
width: 21%; | |
} |
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 | |
/** | |
* Display default value if the field value is empty in the profile view mode. | |
* | |
* @param string $value Field Value. | |
* @param string $default Field Default Value. | |
* @param string $key Field Key. | |
* @param string $type Field Type. | |
* @param array $data Field Data. |
OlderNewer