Make WordPress Core

Changeset 47210


Ignore:
Timestamp:
02/07/2020 11:28:22 PM (4 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.

Location:
trunk/src/wp-includes
Files:
2 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 );
  • trunk/src/wp-includes/general-template.php

    r47198 r47210  
    34013401 *
    34023402 * @see _WP_Editors::editor()
     3403 * @see _WP_Editors::parse_settings()
    34033404 * @since 3.3.0
    34043405 *
    34053406 * @param string $content   Initial content for the editor.
    3406  * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
    3407  * @param array  $settings  See _WP_Editors::editor().
     3407 * @param string $editor_id HTML ID attribute value for the textarea and TinyMCE.
     3408 *                          Should not contain square brackets.
     3409 * @param array  $settings  See _WP_Editors::parse_settings() for description.
    34083410 */
    34093411function wp_editor( $content, $editor_id, $settings = array() ) {
Note: See TracChangeset for help on using the changeset viewer.