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
add_action( 'wp_ajax_um_member_directory_default_filter_settings', 'um_04292024_show_ajax_member_directory', 1 ); | |
function um_04292024_show_ajax_member_directory() { | |
add_filter( 'um_member_directory_filter_select_options', 'um_04292024_show_all_select_options', 999999, 3 ); | |
} | |
function um_04292024_show_all_select_options( $options, $options_arr, $data ) { | |
$key = $data['metakey']; | |
$options = UM()->builtin()->get_a_field( $key )['options']; | |
$data['options'] = $options; |
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
add_filter("um_prepare_user_query_args","um_061522_show_todays_birthdays", 10, 2 ); | |
function um_061522_show_todays_birthdays( $query_args, $directory_data ){ | |
$directory_id = $directory_data['form_id']; | |
if( 320 !== $directory_id ) return $query_args; | |
$query_args['meta_query'][ ] = array( | |
'key' => 'birth_date', | |
'value' => date("/m/d"), |
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
add_action('um_user_before_query','um_061522_show_upcoming_birthdays', 10, 2); | |
function um_061522_show_upcoming_birthdays( $query_args, $obj ){ | |
$directory_id = $obj->get_directory_by_hash( sanitize_key( $_POST['directory_id'] ) ); | |
if( 325 !== $directory_id ) return $query_args; | |
add_action( 'pre_user_query', function( $uqi ) { | |
global $wpdb; | |
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
add_filter("um_ajax_get_members_data","um_061522_future_age_birthdays", 10, 3 ); | |
function um_061522_future_age_birthdays( $data_array, $user_id, $directory_data ){ | |
$directory_id = $directory_data['form_id']; | |
if( 325 !== $directory_id ) return $data_array; | |
um_fetch_user( $user_id ); | |
$hours_in_day = 24; |
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_filter('um_user_pre_updating_profile_array','um_custom_user_pre_updating_profile_array'); | |
function um_custom_user_pre_updating_profile_array( $arr ){ | |
global $ultimatemember; | |
foreach ($arr as $key => $value) { | |
$field = $ultimatemember->fields->get_field( $key ); | |
if( $field['type'] == 'date' && ! empty( $value ) ){ | |
$arr[ $key ] = strtotime( $value ); | |
} |
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
array ( | |
'ALL' => 'Albania Lek', | |
'AFN' => 'Afghanistan Afghani', | |
'ARS' => 'Argentina Peso', | |
'AWG' => 'Aruba Guilder', | |
'AUD' => 'Australia Dollar', | |
'AZN' => 'Azerbaijan New Manat', | |
'BSD' => 'Bahamas Dollar', | |
'BBD' => 'Barbados Dollar', | |
'BDT' => 'Bangladeshi taka', |
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
// Usage: Add this short tag to any Email Template in UM > Email settings: {password_reset_link_v2} | |
/** | |
* UM Placeholders for reset password | |
* | |
* @param $placeholders | |
* | |
* @return array | |
*/ | |
function um_121520_add_placeholder( $placeholders ) { |
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 | |
/*** | |
*** Custom Email Template | |
****/ | |
function um_custom_email_template(){ | |
global $ultimatemember, $user_ID; | |
um_fetch_user( $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
/** | |
* Add new predefined field "Profile Photo" in UM Form Builder. | |
*/ | |
add_filter("um_predefined_fields_hook","um_predefined_fields_hook_profile_photo", 99999, 1 ); | |
function um_predefined_fields_hook_profile_photo( $arr ){ | |
$arr['profile_photo'] = array( | |
'title' => __('Profile Photo','ultimate-member'), | |
'metakey' => 'profile_photo', |
NewerOlder