3

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?

2
  • 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, 2011 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, 2011 at 22:50

1 Answer 1

1
+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');
6
  • I am asking for can_richedit for guests which actually have no role or capability set.
    – shawn
    Oct 22, 2011 at 18:59
  • Why would you show an editor to a guest (ie not-registered) user?
    – xmarcos
    Oct 22, 2011 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, 2011 at 18:51
  • I understand, updated my answer with the solution.
    – xmarcos
    Oct 23, 2011 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, 2011 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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