Make WordPress Core


Ignore:
Timestamp:
03/19/2023 12:51:14 PM (15 months ago)
Author:
SergeyBiryukov
Message:

Tests: Improve documentation and variable names in some formatting tests.

Includes documenting data provider values using hash notation in the tests for:

  • convert_smilies()
  • get_url_in_content()
  • links_add_target()
  • normalize_whitespace()

Follow-up to [26191], [26327], [26328], [26972], [55562].

See #57841.

File:
1 edited

Legend:

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

    r55495 r55563  
    53385338
    53395339/**
    5340  * Adds a Target attribute to all links in passed content.
     5340 * Adds a target attribute to all links in passed content.
    53415341 *
    53425342 * This function by default only applies to `<a>` tags, however this can be
    5343  * modified by the 3rd param.
    5344  *
    5345  * *NOTE:* Any current target attributed will be stripped and replaced.
     5343 * modified by the `$tags` parameter.
     5344 *
     5345 * *NOTE:* Any current target attribute will be stripped and replaced.
    53465346 *
    53475347 * @since 2.7.0
     
    53505350 *
    53515351 * @param string   $content String to search for links in.
    5352  * @param string   $target  The Target to add to the links.
     5352 * @param string   $target  The target to add to the links.
    53535353 * @param string[] $tags    An array of tags to apply to.
    53545354 * @return string The processed content.
Note: See TracChangeset for help on using the changeset viewer.