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 Date format in front-end | |
*/ | |
add_filter('um_profile_field_filter_hook__date','my_custom_sanitize_fields', 9999, 2 ); | |
function my_custom_sanitize_fields( $value, $data ){ | |
global $ultimatemember; | |
if( $data['metakey'] == 'date-pickah' ){ | |
$value = $ultimatemember->datetime->format( $value, "d M Y"); |
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 sanitization of fields | |
*/ | |
add_filter('um_profile_field_filter_hook__','my_custom_sanitize_fields', 99, 2 ); | |
function my_custom_sanitize_fields( $value, $data ){ | |
// Add tags to mail value | |
if ( !is_array( $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
<?php | |
/*** | |
*** @Get user avatar uri | |
***/ | |
// Call ultimatemember global variable | |
global $ultimatemember; | |
$user_id = 1; | |
// Set 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 | |
/*** | |
*** @Do not apply to backend default avatars | |
***/ | |
add_filter('avatar_defaults', 'um_avatar_defaults', 99999 ); | |
function um_avatar_defaults($avatar_defaults) { | |
remove_filter('get_avatar', 'um_get_avatar', 99999, 5); | |
return $avatar_defaults; | |
} | |
?> |
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
/** | |
* @detach action 'um_remove_unused_uploads' | |
*/ | |
function detach_um_remove_unused_uploads( $arg ){ | |
remove_action('um_after_user_upload','um_remove_unused_uploads', 10 ); | |
} | |
add_action('um_after_user_updated','detach_um_remove_unused_uploads',10,1); |
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 | |
/** | |
* @um_user_after_updating_profile | |
*/ | |
function doggycom_redirect_after_updating_profile( $to_update ){ | |
exit( wp_redirect( remove_query_arg( array('profiletab','um_action') ) ) ); | |
} | |
add_action('um_user_after_updating_profile','doggycom_redirect_after_updating_profile',10,1); | |
?> |
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 | |
/*** | |
*** @Dettach um default avatar | |
***/ | |
add_filter('avatar_defaults', 'um_avatar_defaults', 99999 ); | |
function um_avatar_defaults($avatar_defaults) { | |
remove_filter('get_avatar', 'um_get_avatar', 99999, 5); | |
return $avatar_defaults; | |
} |
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
/** | |
*** If you're using a custom WordPress theme, one of the possible causes of the issue is ' Post Relational Links ' added in the Header | |
*** ( https://developer.wordpress.org/reference/functions/adjacent_posts_rel_link/ ) | |
** This feature loads pages in the background process and it causes the register page to load multiple times. | |
** It reloads the Social Tokens again and causes mismatch session keys during authentication | |
** | |
**/ | |
remove_action('wp_head', 'start_post_rel_link', 10, 0 ); | |
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); |
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 | |
$currency_symbols = array( | |
'AED' => 'د.إ', // ? | |
'AFN' => 'Af', | |
'ALL' => 'Lek', | |
'AMD' => '', | |
'ANG' => 'ƒ', | |
'AOA' => 'Kz', // ? | |
'ARS' => '$', | |
'AUD' => '$', |
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', |