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
/** | |
*** 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
/** | |
* @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
jQuery(function(){ | |
jQuery(".um-search form *").keypress(function(e){ | |
if (e.which == 13) { | |
jQuery('.um-search form').submit(); | |
return false; | |
} | |
}); | |
}); |
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: | |
* [um_show_content roles='member'] <!-- insert content here --> [/um_show_content] | |
* You can add multiple target roles, just use ',' e.g. [um_show_content roles='member,candidates,pets'] | |
**/ | |
if( ! function_exists("um_shortcode_show_content_for_role") ){ | |
function um_shortcode_show_content_for_role( $atts = array() , $content = '' ) { | |
$a = shortcode_atts( array( | |
'roles' => 'member', | |
), $atts ); |
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
// Requires Ultimate Member v 1.3.69 above. | |
add_filter("um_user_first_name_case","um_custom_name_case"); | |
add_filter("um_user_last_name_case","um_custom_name_case"); | |
function um_custom_name_case( $string ) | |
{ | |
$word_splitters = array(' ', '-', "O'", "L'", "D'", 'St.', 'Mc', 'Mac'); | |
$lowercase_exceptions = array('the', 'van', 'den', 'von', 'und', 'der', 'de', 'di', 'da', 'of', 'and', "l'", "d'"); | |
$uppercase_exceptions = array('III', 'IV', 'VI', 'VII', 'VIII', 'IX'); |
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 | |
// Profile View | |
add_filter("um_profile_field_filter_hook__myMetaKeyC","um_profile_field_filter_hook__myMetaKeyC"); | |
function um_profile_field_filter_hook__myMetaKeyC( $value, $data ){ | |
$a = um_user("myMetaKeyA"); | |
$b = um_user("myMetaKeyB"); | |
$value = intval( $a ) + intval( $b ); | |
return $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 | |
/** | |
* 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 | |
add_filter("um_register_allow_nonce_verification","um_custom_disable_register_nonce",10,1); | |
function um_custom_disable_register_nonce( $disable ){ | |
return false; | |
} | |
?> |
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( 'option_date_format', 'translate_date_format', 10, 1 ); | |
function translate_date_format( $format ) { | |
do_action( 'wpml_register_single_string', 'Date Formats', 'date format', $format ); | |
$format = apply_filters( 'wpml_translate_single_string', $format, 'Date Formats', 'date format' ); | |
return $format; | |
} | |
// remove the existing filter on init | |
remove_filter( 'um_profile_field_filter_hook__user_registered', 'um_profile_field_filter_hook__user_registered', 99 ); |
OlderNewer