1 | <?php |
---|
2 | |
---|
3 | /* |
---|
4 | Plugin Name: 11862 Example Plugin |
---|
5 | Plugin URI: https://core.trac.wordpress.org/ticket/11862 |
---|
6 | Description: This plugin shows the use of the_editor() more than once on the post editor. |
---|
7 | Author: Chris Jean |
---|
8 | Version: 1.0.0 |
---|
9 | Author URI: http://gaarai.com/ |
---|
10 | */ |
---|
11 | |
---|
12 | |
---|
13 | // the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2) |
---|
14 | |
---|
15 | function add_another_editor_meta_box( $post_type ) { |
---|
16 | add_meta_box( 'another_editor', 'Another Editor', 'render_another_editor', $post_type, 'normal', 'high' ); |
---|
17 | } |
---|
18 | |
---|
19 | function render_another_editor() { |
---|
20 | the_editor( 'Please try using the Visual and HTML tabs to verify if they are working on each editor.', 'additional-content' ); |
---|
21 | |
---|
22 | ?> |
---|
23 | <table class="post-status-info" cellspacing="0"><tbody><tr> |
---|
24 | <td style="padding:2px 7px;">Test</td> |
---|
25 | </tr></tbody></table> |
---|
26 | <?php |
---|
27 | |
---|
28 | } |
---|
29 | |
---|
30 | add_action( 'add_meta_boxes', 'add_another_editor_meta_box' ); |
---|
31 | |
---|
32 | |
---|
33 | ?> |
---|