-
Varun Dubey replied to the topic `bp_messages_star_set_action` utilizes `bp_displayed_user_id`, not correct? in the forum Miscellaneous 10 months ago
@thesun2012 bp_legacy_theme_ajax_messages_star_handler is not mandatory; you can also create your custom handler based on it
for example
function wbcom_custom_buddypress_ajax_handler() {
check_ajax_referer('custom-bp-ajax-nonce', 'security');$displayed_user_id = isset($_POST['displayed_user_id']) && !empty($_POST['displayed_user_id'])…[Read more]
-
Varun Dubey replied to the topic `bp_messages_star_set_action` utilizes `bp_displayed_user_id`, not correct? in the forum Miscellaneous 10 months ago
@thesun2012 Use bp_loggedin_user_id() to tie the action of starring or unstarring a message to the user logged in and performing the action. This function returns the ID of the user who is currently logged into the site. When a user is viewing their profile, both bp_displayed_user_id() and bp_loggedin_user_id() will return the same user ID, as the…[Read more]
@thesun2012
Active 9 months, 3 weeks ago