Docs: Improve description for the `$editor_id` parameter of `wp_editor()` and `_WP_Editors::editor()`.
The restictions mentioned for the parameter value should be consistenct. Props pbiron, SergeyBiryukov. Fixes #49384. Built from https://develop.svn.wordpress.org/trunk@47210 git-svn-id: http://core.svn.wordpress.org/trunk@47010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
01f133ee28
commit
803feb30dd
|
@ -36,7 +36,8 @@ final class _WP_Editors {
|
|||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @param string $editor_id ID for the current editor instance.
|
||||
* @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances.
|
||||
* Should not contain square brackets.
|
||||
* @param array $settings {
|
||||
* Array of editor arguments.
|
||||
*
|
||||
|
@ -75,7 +76,7 @@ final class _WP_Editors {
|
|||
* @see _WP_Editors::parse_settings()
|
||||
*
|
||||
* @param array $settings Array of editor arguments.
|
||||
* @param string $editor_id ID for the current editor instance. Accepts 'classic-block'
|
||||
* @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
|
||||
* when called from block editor's Classic block.
|
||||
*/
|
||||
$settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
|
||||
|
@ -147,8 +148,9 @@ final class _WP_Editors {
|
|||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @param string $content The initial content of the editor.
|
||||
* @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
|
||||
* @param string $content Initial content for the editor.
|
||||
* @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances.
|
||||
* Should not contain square brackets.
|
||||
* @param array $settings See _WP_Editors::parse_settings() for description.
|
||||
*/
|
||||
public static function editor( $content, $editor_id, $settings = array() ) {
|
||||
|
@ -310,8 +312,8 @@ final class _WP_Editors {
|
|||
*
|
||||
* @global string $tinymce_version
|
||||
*
|
||||
* @param string $editor_id
|
||||
* @param array $set
|
||||
* @param string $editor_id Unique editor identifier, e.g. 'content'.
|
||||
* @param array $set Array of editor arguments.
|
||||
*/
|
||||
public static function editor_settings( $editor_id, $set ) {
|
||||
global $tinymce_version;
|
||||
|
@ -353,7 +355,7 @@ final class _WP_Editors {
|
|||
* @since 3.3.0
|
||||
*
|
||||
* @param array $qtInit Quicktags settings.
|
||||
* @param string $editor_id The unique editor ID, e.g. 'content'.
|
||||
* @param string $editor_id Unique editor identifier, e.g. 'content'.
|
||||
*/
|
||||
$qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id );
|
||||
|
||||
|
|
|
@ -3400,11 +3400,13 @@ function wp_default_editor() {
|
|||
* See https://core.trac.wordpress.org/ticket/19173 for more information.
|
||||
*
|
||||
* @see _WP_Editors::editor()
|
||||
* @see _WP_Editors::parse_settings()
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @param string $content Initial content for the editor.
|
||||
* @param string $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
|
||||
* @param array $settings See _WP_Editors::editor().
|
||||
* @param string $editor_id HTML ID attribute value for the textarea and TinyMCE.
|
||||
* Should not contain square brackets.
|
||||
* @param array $settings See _WP_Editors::parse_settings() for description.
|
||||
*/
|
||||
function wp_editor( $content, $editor_id, $settings = array() ) {
|
||||
if ( ! class_exists( '_WP_Editors', false ) ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-alpha-47209';
|
||||
$wp_version = '5.4-alpha-47210';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue