Changeset 37586
- Timestamp:
- 05/27/2016 05:15:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark.php
r37565 r37586 337 337 * Sanitizes the bookmark fields based on what the field name is. If the field 338 338 * 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 * $contextis '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 and345 * passed the value. The 'display' context is the final context and has the346 * `$field` has the filter name and is passed the `$value`, `$bookmark_id`, and347 * `$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. 348 348 * 349 349 * @since 2.3.0 350 350 * 351 * @param string $field The bookmark field352 * @param mixed $value The bookmark field value353 * @param int $bookmark_id Bookmark ID354 * @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 */ 358 function sanitize_bookmark_field( $field, $value, $bookmark_id, $context ) { 359 359 switch ( $field ) { 360 360 case 'link_id' : // ints
Note: See TracChangeset
for help on using the changeset viewer.