mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
Version 1.0.35
This commit is contained in:
+14
-11
@@ -219,22 +219,25 @@ class UM_Shortcodes {
|
||||
$pattern_array = apply_filters('um_allowed_user_tags_patterns', $pattern_array);
|
||||
|
||||
$matches = false;
|
||||
foreach ( $pattern_array as $pattern )
|
||||
{
|
||||
if (preg_match($pattern, $str))
|
||||
{
|
||||
foreach ( $pattern_array as $pattern ) {
|
||||
|
||||
if (preg_match($pattern, $str)) {
|
||||
|
||||
$usermeta = str_replace('{','',$pattern);
|
||||
$usermeta = str_replace('}','',$usermeta);
|
||||
|
||||
if ( um_user( $usermeta ) ){
|
||||
$str = preg_replace('/'.$pattern.'/', um_user($usermeta) , $str );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( get_option('permalink_structure') ) {
|
||||
$str = str_replace( untrailingslashit( um_get_core_page('user') ), untrailingslashit( um_user_profile_url() ), $str );
|
||||
} else {
|
||||
$str = str_replace( um_get_core_page('user'), um_user_profile_url(), $str );
|
||||
|
||||
if ( get_option('permalink_structure') ) {
|
||||
$str = str_replace( untrailingslashit( um_get_core_page('user') ), untrailingslashit( um_user_profile_url() ), $str );
|
||||
} else {
|
||||
$str = str_replace( um_get_core_page('user'), um_user_profile_url(), $str );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $str;
|
||||
|
||||
Reference in New Issue
Block a user