Make WordPress Core

Ticket #11862: 11862-example.php

File 11862-example.php, 898 bytes (added by chrisbliss18, 13 years ago)

Plugin to show an example of this issue. Also usefull for testing.

Line 
1<?php
2
3/*
4Plugin Name: 11862 Example Plugin
5Plugin URI: https://core.trac.wordpress.org/ticket/11862
6Description: This plugin shows the use of the_editor() more than once on the post editor.
7Author: Chris Jean
8Version: 1.0.0
9Author URI: http://gaarai.com/
10*/
11
12
13// the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2)
14
15function add_another_editor_meta_box( $post_type ) {
16        add_meta_box( 'another_editor', 'Another Editor', 'render_another_editor', $post_type, 'normal', 'high' );
17}
18
19function 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
30add_action( 'add_meta_boxes', 'add_another_editor_meta_box' );
31
32
33?>