wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
format_for_editor › WordPress Function
Seit4.3.0
Veraltetn/v
› format_for_editor ( $text, $default_editor = null )
Parameter: (2) |
|
Siehe: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Formats text for the editor.
Generally the browsers treat everything inside a textarea as text, but it is still a good idea to HTML entity encode</code>, >
and &
in the content.
The filter {@see 'format_for_editor'} is applied here. If $text
is empty the
filter will be applied to an empty string.
Ähnliche Funktionen: format_to_edit, edit_form_image_editor, the_editor, media_send_to_editor, image_constrain_size_for_editor
Quellcode
function format_for_editor( $text, $default_editor = null ) { if ( $text ) { $text = htmlspecialchars( $text, ENT_NOQUOTES, get_option( 'blog_charset' ) ); } /** * Filters the text after it is formatted for the editor. * * @since 4.3.0 * * @param string $text The formatted text. * @param string $default_editor The default editor for the current user. * It is usually either 'html' or 'tinymce'. */ return apply_filters( 'format_for_editor', $text, $default_editor ); }