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.

git-svn-id: https://develop.svn.wordpress.org/trunk@55563 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2023-03-19 12:51:14 +00:00
parent d1046dc5f3
commit a387dee3f9
9 changed files with 135 additions and 78 deletions

View File

@@ -5337,19 +5337,19 @@ function _links_add_base( $m ) {
}
/**
* Adds a Target attribute to all links in passed content.
* Adds a target attribute to all links in passed content.
*
* This function by default only applies to `<a>` tags, however this can be
* modified by the 3rd param.
* modified by the `$tags` parameter.
*
* *NOTE:* Any current target attributed will be stripped and replaced.
* *NOTE:* Any current target attribute will be stripped and replaced.
*
* @since 2.7.0
*
* @global string $_links_add_target
*
* @param string $content String to search for links in.
* @param string $target The Target to add to the links.
* @param string $target The target to add to the links.
* @param string[] $tags An array of tags to apply to.
* @return string The processed content.
*/