Docs: Update description for the $context parameter of sanitize_title() and sanitize_title_with_dashes().

This brings some consistency between the two DocBlocks and adjusts the latter one per the documentation standards.

Follow-up to [49482].

See #50569.

git-svn-id: https://develop.svn.wordpress.org/trunk@49484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-11-02 20:18:12 +00:00
parent d6653ff05b
commit 14fe5a8932

View File

@ -2164,6 +2164,7 @@ function sanitize_key( $key ) {
* @param string $title The string to be sanitized.
* @param string $fallback_title Optional. A title to use if $title is empty. Default empty.
* @param string $context Optional. The operation for which the string is sanitized.
* When set to 'save', the string runs through remove_accents().
* Default 'save'.
* @return string The sanitized string.
*/
@ -2216,8 +2217,9 @@ function sanitize_title_for_query( $title ) {
*
* @param string $title The title to be sanitized.
* @param string $raw_title Optional. Not used. Default empty.
* @param string $context Optional. The context for the sanitization. When set to 'save', additional entities are converted to hyphens or stripped entirely.
* Default 'display'.
* @param string $context Optional. The operation for which the string is sanitized.
* When set to 'save', additional entities are converted to hyphens
* or stripped entirely. Default 'display'.
* @return string The sanitized title.
*/
function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) {