Ticket #17144: 17144-the_editor.patch
File 17144-the_editor.patch, 5.0 KB (added by , 13 years ago) |
---|
-
wp-admin/edit-form-advanced.php
266 266 <?php if ( post_type_supports($post_type, 'editor') ) { ?> 267 267 <div id="postdivrich" class="postarea"> 268 268 269 <?php wp_editor($post->post_content, 'content'); ?>269 <?php the_editor($post->post_content, 'content'); ?> 270 270 271 271 <table id="post-status-info" cellspacing="0"><tbody><tr> 272 272 <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td> -
wp-admin/edit-form-comment.php
121 121 122 122 <div id="postdiv" class="postarea"> 123 123 <?php 124 $quicktags_settings = array( ' quicktags_buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );125 wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );124 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ); 125 the_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 126 126 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 127 127 </div> 128 128 -
wp-admin/includes/deprecated.php
15 15 /** 16 16 * @since 2.1 17 17 * @deprecated 2.1 18 * @deprecated Use wp_editor().19 * @see wp_editor()18 * @deprecated Use the_editor(). 19 * @see the_editor() 20 20 */ 21 21 function tinymce_include() { 22 _deprecated_function( __FUNCTION__, '2.1', ' wp_editor()' );22 _deprecated_function( __FUNCTION__, '2.1', 'the_editor()' ); 23 23 24 wp_editor('', 'content');24 the_editor(''); 25 25 } 26 26 27 27 /** … … 705 705 /** 706 706 * @since 2.7 707 707 * @deprecated 3.3 708 * @deprecated Use wp_editor().709 * @see wp_editor()708 * @deprecated Use the_editor(). 709 * @see the_editor() 710 710 */ 711 711 function wp_tiny_mce() { 712 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); 713 714 wp_editor('', 'content'); 712 _deprecated_function( __FUNCTION__, '3.3' ); 715 713 } 716 714 717 715 // see WP_Editor for the next 4 -
wp-includes/deprecated.php
2621 2621 * 2622 2622 * @see WP_Editor::wp_default_editor() 2623 2623 * @since 2.5.0 2624 * @deprecated 3. 52624 * @deprecated 3.3 2625 2625 * 2626 2626 * @return bool 2627 2627 */ … … 2637 2637 return $wp_editor->wp_default_editor(); 2638 2638 } 2639 2639 2640 /**2641 * Display editor: TinyMCE, HTML, or both.2642 *2643 * @since 2.1.02644 * @deprecated 3.32645 *2646 * @param string $content Textarea content.2647 * @param string $id Optional, default is 'content'. HTML ID attribute value.2648 * @param string $prev_id Optional, not used2649 * @param bool $media_buttons Optional, default is true. Whether to display media buttons.2650 * @param int $tab_index Optional, not used2651 */2652 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {2653 2654 wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );2655 return;2656 }2657 -
wp-includes/general-template.php
1750 1750 } 1751 1751 1752 1752 /** 1753 * Loads and initializes WP_Editor class if needed, passes the settings for an instance of the editor 1753 * Display editor: Visual, HTML, or both. 1754 * 1755 * Loads and initializes WP_Editor class, passes the settings for an instance of the editor 1754 1756 * 1755 1757 * @see wp-includes/class-wp-editor.php 1756 * @since 3.31758 * @since 2.1.0 1757 1759 * 1758 1760 * @param string $content Initial content for the editor. 1759 * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE.1760 * @param array $settings Se e WP_Editor::editor().1761 * @param string $editor_id HTML ID for the textarea, TinyMCE and Quicktags, also used to construct the HTML IDs for all surounding elements. 1762 * @param array $settings Settings for both editors (TinyMCE and Quicktags) and for the surrounding HTML, see WP_Editor::editor() for description. 1761 1763 */ 1762 function wp_editor( $content, $editor_id, $settings = array() ) {1764 function the_editor( $content, $editor_id = 'content', $settings = array() ) { 1763 1765 global $wp_editor; 1764 1766 1767 if ( !is_array($settings) ) { 1768 $settings = array(); // the old arg $prev_id = 'title' is not used 1769 $args = func_get_args(); 1770 1771 $settings['media_buttons'] = !empty($args[3]) ? $args[3] : true; 1772 $settings['tabindex'] = !empty($args[4]) ? $args[4] : 2; 1773 } 1774 1765 1775 if ( !is_a($wp_editor, 'WP_Editor') ) { 1766 1776 require( ABSPATH . WPINC . '/class-wp-editor.php' ); 1767 1777 $wp_editor = new WP_Editor;