[jQuery]Adding shortcode

Seeing the form was for feedback purposes and not a lot was need I implemented a simple form of my own. jQuery: <form method=’post’ id=’feedback-form’>\ <textarea name=”feedback-message” id=’feedback-message’ rows=”10″ cols=”10″ required />\ <input type=”submit” name=”feedback-submit” id=’feedback-submit’ class=”ninja-forms-field btn btn-primary custom-button red-btn” value=”Thanks!” \ placeholder=”Type your comments/suggestions/functionality requests” />\ </form>\ PHP add_action( ‘init’, ‘feedback_form_submit’ ); function … Read more

How to load wp_editor via AJAX

The main problem are the missing scripts. The scripts enqueued in _WP_Editors::enqueue_scripts() are never printed. The same is true for _WP_Editors::editor_js(). So you have to do that in your AJAX callback handler. I have written a demo plugin and put it on GitHub: T5 AJAX Editor. There is one class named Ajax_Editor. Its method render() … Read more