Reply To: Is there a way to remove this character "|" next to the subscription link?
glad to have someone else looking !
My ajax is hopeless !
Your solution is valid, but digging for it produced some code issue
we have several issues here
firstly the filter call is wrong in the code ie
bbpress/includes/topics/template.php has two errors
function bbp_get_topic_subscription_link( $args = array() ) {
......Parse the arguments......
), 'get_forum_subscribe_link' );
so the function is ‘get_topic_subscription’ but the parse argument reverts to ‘get_forum_subscribe‘
whilst it doesn’t affect this issue the error is repeated for favorites in the same file
function bbp_get_topic_favorite_link( $args = array() ) {
..........), 'get_forum_favorite_link' );
needs changing to ‘get_topic_favorite_link’`
This doesn’t affect the issue as such, other than the filters above are wrong.
But filtering bbp_get_topic_subscription_link is totally pointless, as it immediately calls
‘get_user_subscribe_link’ which them resets the |, so whilst the filter seems to correct it once, any click just resets it.
So your filter to get_user_subscribe_link is the correct one, but for the wrong reason.
Really the code needs to have the filter in one place only (suspect user)
Anyway the solution for @majid436 is as you suggest
function hide_before3 ($args = array() ) {
$args['before'] = '';
return $args;
}
add_filter ('bbp_before_get_user_subscribe_link_parse_args','hide_before3');