Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress 12.4.1 Security Release

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    I will soon package a new maintenance release. I was a bit too much conservative during the Output escaping review I did to build the 12.4.1 security release.

    I apologize. Thanks in advance for your understanding.


    arjani1
    Participant

    @arjani1

    All profile pictures are now missing from members’ accounts. Along with them, the menu for “change profile pic” is also missing. Can you please help?

    I didn’t realise this issue and have done much work in these 5 days, so I cannot really restore the backup from 5 days ago.

    Thanks
    Hana

    Hi Hana (@arjani1)

    I just tested with latest WordPress (Twenty Nineteen theme) & only BuddyPress 12.4.1 as the active plugin and I can’t reproduce your issue, see screenshot below:

    User's account

    – There’s an avatar in the header
    – The menu to change avatar is available & behaves as expected.

    So to me it’s not relative to 12.4.1.


    koka777
    Participant

    @koka777

    Hello,
    Please help, by default the user profile page is based on the page.php template from my theme.
    Is there any possibility to redirect it to another? (custom-page.php)


    Mathieu Viet
    Moderator

    @imath

    Hi @koka777

    You can add a buddypress.php template to your active theme directory, if this template is available it will be used instead of the page.php one.


    koka777
    Participant

    @koka777

    Hi @imath
    Thanks for the help!
    Maybe you can suggest something with this. I want to add a counter of new posts from the activity feed to the custom menu.
    I put it in functions.php but didn’t get any results. With my meager knowledge, I did not succeed. I can’t figure out how to add a counter to my custom menu.
    P.S I’m not sure that the code itself is workable!

    Here on the forum I was offered the following code:

    <?php
    function bp_update_last_visit() {
    if (is_user_logged_in()) {
    update_user_meta(get_current_user_id(), 'last_visit', current_time('mysql'));
    }
    }
    add_action('wp_login', 'bp_update_last_visit'); 
    add_action('wp', 'bp_update_last_visit'); 
    ?>
    <?php
    function bp_get_new_activity_count() {
    $last_visited = get_user_meta(get_current_user_id(), 'last_visit', true);
    $args = array(
    'action' => 'new_post', // Adjust based on the actions you want to count
    'since' => $last_visited, // Filter activities since the last visit
    );
    
    // Query BuddyPress activity with arguments
    $activities = new BP_Activity_Query($args);
    return $activities->get_total();
    }
    ?>
            <?php
            function add_activity_notification_count() {
    $count = bp_get_new_activity_count();
    if ($count > 0) {
    echo '<span class="activity-notification-count">' . $count . '</span>';
    }
    }
    add_action('bp_menu', 'add_activity_notification_count');
      ?> 
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar