Fixed issues with "key => value" fields (dropdown + multiselect) if 'um_select_options_pair' filter is used;

Added JS filters to member directory functionality;
This commit is contained in:
nikitasinelnikov
2020-02-06 14:54:13 +02:00
parent 52dfdb5d54
commit 067f0d6a78
12 changed files with 193 additions and 83 deletions
+5 -5
View File
@@ -773,18 +773,18 @@ function um_user_submitted_registration( $style = false ) {
/**
* Show filtered social link
*
* @param $key
* @param $match
* @param string $key
* @param string $match
*
* @return mixed|string|void
* @return string
*/
function um_filtered_social_link( $key, $match ) {
$value = um_profile( $key );
$submatch = str_replace( 'https://', '', $match );
$submatch = str_replace( 'http://', '', $submatch );
if (strstr( $value, $submatch )) {
if ( strstr( $value, $submatch ) ) {
$value = 'https://' . $value;
} else if (strpos( $value, 'http' ) !== 0) {
} elseif ( strpos( $value, 'http' ) !== 0 ) {
$value = $match . $value;
}
$value = str_replace( 'https://https://', 'https://', $value );