This topic has 4 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #187815
     MichaelP
    Participant

    Kleo removes square brackets from activity updates. For instance, if I post “$test[1]”, the activity page will display “$test”.

    The problem is caused by kleo_bp_activity_filter() in kleo/lib/plugin-buddypress/config.php. Why do you want to remove shortcodes from the activity stream?

    I added this to our function.php in the child theme to solve the problem:

    function kleo_brackets() {

    remove_filter(‘bp_get_activity_content_body’, ‘kleo_bp_activity_filter’, 1);

    }

    add_action( ‘init’, ‘kleo_brackets’);

    Does this break anything in Kleo?

    #187913
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #187971
     Radu
    Moderator

    Hi,

    Many users wants to not run the short codes there, so it’s if if you had find a solution.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #188007
     MichaelP
    Participant

    Well, kleo_bp_activity_filter does not really remove shortcodes. The filter removes square brackets which is a problem because members can’t post code properly this way. Most programming languages require square brackets.

    Besides, as far as I know BuddyPress removes all registered shortcodes from activity updates anyway. So I think you don’t really need kleo_bp_activity_filter.

    Anyway, I am fine with removing the filter in functions.php. I am just reluctant to remove other people’s filter if I don’t fully understand what they are good for.

    Thanks for the replies!

    #188028
     Radu
    Moderator

    Hi,

    No problem

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?