Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_editor [ WordPress Function ]

wp_editor ( $content, $editor_id, $settings = array() )
Parameters:
  • (string) $content Initial content for the editor.
  • (string) $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
  • (array) $settings See _WP_Editors::editor().
See:
  • wp-includes/class-wp-editor.php
Defined at:



Renders an editor.

Using this function is the proper way to output all needed components for both TinyMCE and Quicktags. _WP_Editors should not be used directly. See http://core.trac.wordpress.org/ticket/17144.

NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason running wp_editor() inside of a metabox is not a good idea unless only Quicktags is used. On the post edit screen several actions can be used to include additional editors containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'. See http://core.trac.wordpress.org/ticket/19173 for more information.

Source


<?php
function wp_editor$content$editor_id$settings = array() ) {
    if ( ! 
class_exists'_WP_Editors' ) )
        require( 
ABSPATH WPINC '/class-wp-editor.php' );

    
_WP_Editors::editor($content$editor_id$settings);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics