Make WordPress Core

Changeset 49941


Ignore:
Timestamp:
01/06/2021 05:23:53 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct description for wp_parse_list().

The function simply converts a comma- or space-separated list of scalar values to an array and does not perform any sanitization on its own.

Follow-up to [44546].

Props johnjamesjacoby.
See #51800.

File:
1 edited

Legend:

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

    r49935 r49941  
    44344434
    44354435/**
    4436  * Merge user defined arguments into defaults array.
     4436 * Merges user defined arguments into defaults array.
    44374437 *
    44384438 * This function is used throughout WordPress to allow for both string or array
     
    44634463
    44644464/**
    4465  * Cleans up an array, comma- or space-separated list of scalar values.
     4465 * Converts a comma- or space-separated list of scalar values to an array.
    44664466 *
    44674467 * @since 5.1.0
    44684468 *
    44694469 * @param array|string $list List of values.
    4470  * @return array Sanitized array of values.
     4470 * @return array Array of values.
    44714471 */
    44724472function wp_parse_list( $list ) {
     
    44794479
    44804480/**
    4481  * Clean up an array, comma- or space-separated list of IDs.
     4481 * Cleans up an array, comma- or space-separated list of IDs.
    44824482 *
    44834483 * @since 3.0.0
     
    44934493
    44944494/**
    4495  * Clean up an array, comma- or space-separated list of slugs.
     4495 * Cleans up an array, comma- or space-separated list of slugs.
    44964496 *
    44974497 * @since 4.7.0
Note: See TracChangeset for help on using the changeset viewer.