[Plugin: WP User Frontend] textarea with TinyMCE
-
This plugin has really great potential, and it solves a big problem for a project I’m doing. Thanks for your great work.
I did a little tinkering to see if I could get this working with the new wp_editor() in WP 3.3.1. Thought I’d share.
In wpuf_add_post.php I replaced this (about line 41)
<textarea name="wpuf_post_content" id="new-post-desc" cols="40" rows="8"></textarea>
with this
<?php wp_editor( '', 'wpuf_post_content', $settings = array('textarea_name','wpuf_post_content') ); ?>
And in wpuf_edit_post.php I replaced this (about line 74)
<textarea name="wpuf_post_content" id="new-post-desc" cols="40" rows="8"><?php echo esc_html($post->post_content); ?></textarea>
with this
<?php wp_editor( $post->post_content, 'wpuf_post_content', $settings = array('textarea_name','wpuf_post_content') ); ?>
Seems to work beautifully, though I’ve only done a tiny bit of testing. I’m a PHP newbie, so let me know if I’ve done something awful here.
Note that the codex says that the ID in wp_editor() may only be lowercase letters with no underscores, hyphens, and so forth. I did not follow that here for my quick tinkering, but the appropriate adjustments proabably should be made.
- The topic ‘[Plugin: WP User Frontend] textarea with TinyMCE’ is closed to new replies.