Make WordPress Core

Changeset 54520


Ignore:
Timestamp:
10/16/2022 03:44:18 PM (18 months ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify default values for a few block function parameters.

This applies to:

  • $block_name in strip_core_block_namespace()
  • $allowed_html in filter_block_content()
  • $pagination_type in get_comments_pagination_arrow()

Follow-up to [46896], [48794], [53138], [54181].

Props rakibwordpress, ironprogrammer, sabernhardt, SergeyBiryukov.
Fixes #56596.

File:
1 edited

Legend:

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

    r54415 r54520  
    688688 * @since 5.3.1
    689689 *
    690  * @param string $block_name Original block name.
     690 * @param string|null $block_name Optional. Original block name. Null if the block name is unknown,
     691 *                                e.g. Classic blocks have their name set to null. Default null.
    691692 * @return string Block name to use for serialization.
    692693 */
     
    784785 *
    785786 * @param string         $text              Text that may contain block content.
    786  * @param array[]|string $allowed_html      An array of allowed HTML elements and attributes,
     787 * @param array[]|string $allowed_html      Optional. An array of allowed HTML elements and attributes,
    787788 *                                          or a context name such as 'post'. See wp_kses_allowed_html()
    788  *                                          for the list of accepted context names.
     789 *                                          for the list of accepted context names. Default 'post'.
    789790 * @param string[]       $allowed_protocols Optional. Array of allowed URL protocols.
    790791 *                                          Defaults to the result of wp_allowed_protocols().
     
    14131414 *
    14141415 * @param WP_Block $block Block instance.
    1415  *
    14161416 * @return array Returns the comment query parameters to use with the
    14171417 *               WP_Comment_Query constructor.
     
    14841484 *
    14851485 * @param WP_Block $block           Block instance.
    1486  * @param string   $pagination_type Type of the arrow we will be rendering.
    1487  *                                  Default 'next'. Accepts 'next' or 'previous'.
    1488  *
     1486 * @param string   $pagination_type Optional. Type of the arrow we will be rendering.
     1487 *                                  Accepts 'next' or 'previous'. Default 'next'.
    14891488 * @return string|null The pagination arrow HTML or null if there is none.
    14901489 */
Note: See TracChangeset for help on using the changeset viewer.