From 47306630ca8d2aea4c3e2126b1fd86984b80c352 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 13 Dec 2015 19:22:26 +0000 Subject: [PATCH] Docs: Improve documentation for `format_for_editor()` and the `'the_editor_content'` filter it is hooked to. Props AramZS for initial patch. Fixes #34866. Built from https://develop.svn.wordpress.org/trunk@35904 git-svn-id: http://core.svn.wordpress.org/trunk@35868 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 4 +++- wp-includes/formatting.php | 10 ++++++++-- wp-includes/version.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index a6504d4ea9..ee877a3aaf 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -261,7 +261,9 @@ final class _WP_Editors { * * @since 2.1.0 * - * @param string $content Default editor content. + * @param string $content Default editor content. + * @param string $default_editor The default editor for the current user. + * Either 'html' or 'tinymce'. */ $content = apply_filters( 'the_editor_content', $content, $default_editor ); diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index c9899bb8c3..6253f8f264 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -3268,7 +3268,11 @@ function ent2ncr( $text ) { * * @since 4.3.0 * - * @param string $text The text to be formatted. + * @see _WP_Editors::editor() + * + * @param string $text The text to be formatted. + * @param string $default_editor The default editor for the current user. + * It is usually either 'html' or 'tinymce'. * @return string The formatted text after filter is applied. */ function format_for_editor( $text, $default_editor = null ) { @@ -3281,7 +3285,9 @@ function format_for_editor( $text, $default_editor = null ) { * * @since 4.3.0 * - * @param string $text The formatted text. + * @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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0a9f56c03a..7f720af050 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35903'; +$wp_version = '4.5-alpha-35904'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.