Forum Replies Created
-
In reply to: Allow HTML from users
I am having this problem with span and p tags showing up as code in the posts, after the latest update.
I tried your advice above and added the following function, but it did not work (p and span tags are still showing, not parsing as html).
Any advice would be greatly appreciated, please. A screenshot of the output can be viewed here: http://screencast.com/t/CKTLbqHVb
add_action( 'bbp_kses_allowed_tags','pyg_kses_allowed_tags',999,1); function pyg_kses_allowed_tags($input){ return array( // paragraphs 'p' => array( 'style' => array() ), 'span' => array( 'style' => array() ), // Links 'a' => array( 'href' => array(), 'title' => array(), 'rel' => array() ), // Quotes 'blockquote' => array( 'cite' => array() ), // Code 'code' => array(), 'pre' => array(), // Formatting 'em' => array(), 'strong' => array(), 'del' => array( 'datetime' => true, ), // Lists 'ul' => array(), 'ol' => array( 'start' => true, ), 'li' => array(), // Images 'img' => array( 'src' => true, 'border' => true, 'alt' => true, 'height' => true, 'width' => true, ) ); }
In reply to: Roles and Capabilities in bbPress 2.2Thanks, that worked! Given that my client is launching in the AM, he and I *both* appreciate your help.
In regards to debugging the reason why that hook is not being called – I think I will post this on to iMember360 and let them look at *that* one.
Again, thanks a bunch – I can finally go to bed now.
In reply to: Roles and Capabilities in bbPress 2.2Well I got this far, but every time I try to call the function you suggested, or try to add the role manually, it breaks. Any ideas what I might be missing, please?
add_action( 'wp', 'bbp_check_user_role_on_load' ); function bbp_check_user_role_on_load() { global $user_ID; //do they have a role set already? $has_bbp_role = bbp_get_user_role( $user_ID ); if(!$has_bbp_role){ //nope, add default BBP role //tried this but it breaks it //bbp_set_current_user_default_role(); // Load up bbPress once $bbp = bbpress(); $new_role = 'participant'; //this breaks too - wtf? //$bbp->current_user->add_role( $new_role ); } }
In reply to: Roles and Capabilities in bbPress 2.2Thanks for that.
I’m guessing they are worried about ‘breaking’ millions of sites. While I am sure you are exceptionally diligent, even with the relatively small community BBpress has, you are already seeing edge cases here that you hadn’t imagined. With custom Roles and Caps and so many plugins to contend with, I’m sure there are a *few* more in the WP community.
In reply to: Roles and Capabilities in bbPress 2.2Thanks for pointing me in the right direction John – what file do I find that in please?
To be honest, I haven’t dove right into the inner workings of iMember360 plugin yet, to understand fully what they are doing to create users/log people in, but I do know that it isn’t playing well with what you have done.
Thanks for finally getting the roles sorted, excellent work! Now when the WP core team gets Roles/Caps sorted we will be laughing!
In reply to: Roles and Capabilities in bbPress 2.2@Stephen – I don’t want to map them manually – Sorry, my wording was incorrect.
What I meant in my post is that I want to create an Automated Function to tie into a hook when they enter the site, because the Login Hook is not being fired.
I need to know what BBpress function to call to assign them a role in BBpress, please.
In reply to: Roles and Capabilities in bbPress 2.2If you create the user, it doesn’t assign them a role right away. They’ll get role mapped once they login to the site, or once you assign them a role.
In theory, but in a site using iMember360 and Infusionsoft, the user creation bypasses the standard WordPress hooks. So does logging in. Which leaves me with users who are subscribers but do not get a “Participant” role.
I have been looking for documentation for how you are “mappping” them to a role as you mention, but can’t find any. Where are the roles stored now, please, and do you have an easy function I can call on a different hook so I can “map” them manually, please?
In reply to: Feature Request: Change Post AuthorThanks a bunch!