where did this code come from?
I found it on a bbpress support discussion because I only wanted you to keep the modify, edit and trash links. But the link to edit never worked, before or after adding this code
try
add_filter ('bbp_get_reply_admin_links', 'change_admin_links' ) ;
correction, that will not wok
so this should work, but looks like your function
// change admin links displayed
add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;
function change_admin_links ($r) {
$r['links'] = apply_filters( 'rw_reply_admin_links', array(
'edit' => bbp_get_reply_edit_link ( $r ),
//'move' => bbp_get_reply_move_link ( $r ),
//'split' => bbp_get_topic_split_link ( $r ),
'trash' => bbp_get_reply_trash_link ( $r ),
//'spam' => bbp_get_reply_spam_link ( $r ),
//'approve' => bbp_get_reply_approve_link( $r ),
'reply' => bbp_get_reply_to_link ( $r )
), $r['id'] );
return $r['links'] ;
}
I don’t understand why it’s not work.
I have a function for topic links and function for answer (reply) links
// change answer links displayed
add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;
function change_admin_links ($r) {
$r['links'] = apply_filters( 'rw_reply_admin_links', array(
'reply' => bbp_get_reply_to_link ( $r ),
// 'edit' => bbp_get_topic_edit_link ( $r ),
'edit' => bbp_get_reply_edit_link ( $r ),
'trash' => bbp_get_reply_trash_link ( $r ),
), $r['id'] );
return $r['links'] ;
}
//change topic links displayed
add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' ) ;
function change_topic_admin_links ($r) {
$r['links'] = apply_filters( 'rw_topic_admin_links', array(
'reply' => bbp_get_topic_reply_link ( $r ),
// 'edit' => bbp_get_topic_edit_link ( $r ),
'edit' => bbp_get_topic_edit_link ( $r ),
'trash' => bbp_get_topic_trash_link ( $r ),
), $r['id'] );
return $r['links'] ;
}
I can only suggest you enable debug and see if this throws up an error
I don’t have any errors, but in the debug log, I see:
PHP Deprecated: Creation of dynamic property BBP_Forums_Component::$members
PHP Deprecated: Creation of dynamic property BBP_Forums_Component::$activity
However, I don’t think these are causing the problem. Only the bbp_get_reply_edit_link() function is not working, and I don’t understand why. Do you have any ideas, please?
Ok do the users have permission to edit replies
Ok do the users have permission to edit replies
I don’t know, where can I verify this information please ?
I’m on holiday but from memory
Dashboard settings forums and there is a setting for how many minutes users can edit responses and set it to a large number