Skip to content

Commit ea5569d

Browse files
DrewAPictureDrewAPicture
authored andcommitted
Docs: Improve formatting in the DocBlock for sanitize_bookmark_field().
See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@37586 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 110c610 commit ea5569d

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/wp-includes/bookmark.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -336,26 +336,26 @@ function sanitize_bookmark($bookmark, $context = 'display') {
336336
*
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.
339+
* filtering is applied. After the more strict filter is applied, if the `$context`
340+
* is 'raw' then the value is immediately return.
341341
*
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.
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
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.
357357
*/
358-
function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
358+
function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) {
359359
switch ( $field ) {
360360
case 'link_id' : // ints
361361
case 'link_rating' :

0 commit comments

Comments
 (0)