Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sd17

    (@sd17)

    Thanks for the response. I thought about creating a second meta value, but I’d like to avoid it since it’s very temporary and I have a large user base.

    I am using a plugin that handles my user profiles (UPME). Unfortunately when I fire update_profile it doesn’t contain the new saved profile values yet. The plugin includes it’s own action upme_profile_update but there is support for $old_user_data.

    You are correct in the “weird code smell”. I’m not sure why they couldn’t of used profile_update, but I’m sure there’s a reason.

    From what I understand I must use $GLOBALS since I’m setting my variable inside of a function (I’m not the greatest developer if you couldn’t already tell). Using $GLOBALS[‘custom_user_meta’] works, and then I have unset it after I’m finished with it.

    Why is it bad practice to use declare global vars?

    Thread Starter sd17

    (@sd17)

    You are right!

    The action add_user_role worked! Thank you so much for you’re explanation.

    Cheers.

    Matthias70:

    I had the same issue. I’m not sure if this is right, but it works.

    In the function bbp_theme_before_forum_title() add break; at the end of foreach.

    foreach( $result as $row ) {
    				if ( in_array( (int) $row->post_id, array_filter( $new_topics_array ) ) ) {
    					echo '<span class="new-topic-notifier">' . __( 'New', 'new-topics' ) . '</span> ';
    					break;
    				}
    			}
Viewing 3 replies - 1 through 3 (of 3 total)