Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Using wp 3.3beta1 with the wp_editor on the front-end for bbPress.

When calling the editor on the front end, how do I allow a guest to see the visual editor?

I only see options to disable the visual editor site wide, or on a per user basis, but no option to allow guests to use visual?

share|improve this question
    
Considering this is a feature of a pre-release version of WP that's still in development ... I doubt you're going to get much traction in the short term. Most of the people here haven't even heard of wp_editor(), let alone used it enough to offer advice ... –  EAMann Oct 19 '11 at 20:44
    
Yeah, that is why I have been posting these editor questions on a few sites in the hopes that someone else has tried playing around with the editor/rich edit. The alpha/beta wordpress support forum is pretty much a ghost town. Also trying to get some of these questions out there in the hopes that devs see them prior to release of 3.3, otherwise it's gonna be months before it's ready to use. It is VERY close right now to being fully usable. –  shawn Oct 19 '11 at 22:50
add comment

1 Answer

up vote 0 down vote accepted
+50

Just add the can_richedit capability to the user you want to be able to use the editor.

You can use the Capability Manager to do it.

Update: to enable the rich editor on anonymous/guest users, add this to your funcitons.php or anywhere you like, just make sure it comes before the wp_editor() call.

add_filter('user_can_richedit', '__return_true');
share|improve this answer
    
I am asking for can_richedit for guests which actually have no role or capability set. –  shawn Oct 22 '11 at 18:59
    
Why would you show an editor to a guest (ie not-registered) user? –  xmarcos Oct 22 '11 at 19:15
    
I am using the bbPress forums plugin which has the option of allowing guests to post topics and replies without logging in. Normally bbPress uses a simple textarea input but I replaced that box with the wp_editor, hence the need for guests can richedit. This issue is going to be coming up a lot once people realize we can now use the editor on the front end. (can even use it for comments, so another reason to allow guests to richedit) Hope that clears it up a bit. –  shawn Oct 23 '11 at 18:51
    
I understand, updated my answer with the solution. –  xmarcos Oct 23 '11 at 22:21
    
thank you, it worked. Can you think of any 'security' related reasons why not to do this? I'm guessing the richeditor takes care of security for user input, but not sure. –  shawn Oct 25 '11 at 0:13
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.