WordPress.org

Make WordPress Core

Changeset 37586


Ignore:
Timestamp:
05/27/2016 05:15:58 PM (3 years ago)
Author:
DrewAPicture
Message:

Docs: Improve formatting in the DocBlock for sanitize_bookmark_field().

See #32246.

File:
1 edited

Legend:

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

    r37565 r37586  
    337337 * Sanitizes the bookmark fields based on what the field name is. If the field
    338338 * has a strict value set, then it will be tested for that, else a more generic
    339  * filtering is applied. After the more strict filter is applied, if the
    340  * $context is 'raw' then the value is immediately return.
    341  *
    342  * Hooks exist for the more generic cases. With the 'edit' context, the
    343  * {@see 'edit_$field'} filter will be called and passed the `$value` and `$bookmark_id`
    344  * respectively. With the 'db' context, the {@see 'pre_$field'} filter is called and
    345  * passed the value. The 'display' context is the final context and has the
    346  * `$field` has the filter name and is passed the `$value`, `$bookmark_id`, and
    347  * `$context`, respectively.
     339 * filtering is applied. After the more strict filter is applied, if the `$context`
     340 * is 'raw' then the value is immediately return.
     341 *
     342 * Hooks exist for the more generic cases. With the 'edit' context, the {@see 'edit_$field'}
     343 * filter will be called and passed the `$value` and `$bookmark_id` respectively.
     344 *
     345 * With the 'db' context, the {@see 'pre_$field'} filter is called and passed the value.
     346 * The 'display' context is the final context and has the `$field` has the filter name
     347 * and is passed the `$value`, `$bookmark_id`, and `$context`, respectively.
    348348 *
    349349 * @since 2.3.0
    350350 *
    351  * @param string $field The bookmark field
    352  * @param mixed $value The bookmark field value
    353  * @param int $bookmark_id Bookmark ID
    354  * @param string $context How to filter the field value. Either 'raw', 'edit',
    355  *      'attribute', 'js', 'db', or 'display'
    356  * @return mixed The filtered value
    357  */
    358 function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
     351 * @param string $field       The bookmark field.
     352 * @param mixed  $value       The bookmark field value.
     353 * @param int    $bookmark_id Bookmark ID.
     354 * @param string $context     How to filter the field value. Accepts 'raw', 'edit', 'attribute',
     355 *                            'js', 'db', or 'display'
     356 * @return mixed The filtered value.
     357 */
     358function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) {
    359359    switch ( $field ) {
    360360    case 'link_id' : // ints
Note: See TracChangeset for help on using the changeset viewer.