Make WordPress Core


Ignore:
Timestamp:
02/07/2020 11:28:22 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r47198 r47210  
    3737         * @since 3.3.0
    3838         *
    39          * @param string $editor_id ID for the current editor instance.
     39         * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances.
     40         *                          Should not contain square brackets.
    4041         * @param array  $settings {
    4142         *     Array of editor arguments.
    … …  
    7677                 *
    7778                 * @param array  $settings  Array of editor arguments.
    78                  * @param string $editor_id ID for the current editor instance. Accepts 'classic-block'
     79                 * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block'
    7980                 *                          when called from block editor's Classic block.
    8081                 */
    … …  
    148149         * @since 3.3.0
    149150         *
    150          * @param string $content The initial content of the editor.
    151          * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
    152          * @param array $settings See _WP_Editors::parse_settings() for description.
     151         * @param string $content   Initial content for the editor.
     152         * @param string $editor_id HTML ID for the textarea and TinyMCE and Quicktags instances.
     153         *                          Should not contain square brackets.
     154         * @param array  $settings  See _WP_Editors::parse_settings() for description.
    153155         */
    154156        public static function editor( $content, $editor_id, $settings = array() ) {
    … …  
    311313         * @global string $tinymce_version
    312314         *
    313          * @param string $editor_id
    314          * @param array  $set
     315         * @param string $editor_id Unique editor identifier, e.g. 'content'.
     316         * @param array  $set       Array of editor arguments.
    315317         */
    316318        public static function editor_settings( $editor_id, $set ) {
    … …  
    354356                         *
    355357                         * @param array  $qtInit    Quicktags settings.
    356                          * @param string $editor_id The unique editor ID, e.g. 'content'.
     358                         * @param string $editor_id Unique editor identifier, e.g. 'content'.
    357359                         */
    358360                        $qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id );
Note: See TracChangeset for help on using the changeset viewer.