| @@ 322-330 (lines=9) @@ | ||
| 319 | $link_id = $bookmark['link_id']; |
|
| 320 | } |
|
| 321 | ||
| 322 | foreach ( $fields as $field ) { |
|
| 323 | if ( $do_object ) { |
|
| 324 | if ( isset($bookmark->$field) ) |
|
| 325 | $bookmark->$field = sanitize_bookmark_field($field, $bookmark->$field, $link_id, $context); |
|
| 326 | } else { |
|
| 327 | if ( isset($bookmark[$field]) ) |
|
| 328 | $bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $link_id, $context); |
|
| 329 | } |
|
| 330 | } |
|
| 331 | ||
| 332 | return $bookmark; |
|
| 333 | } |
|
| @@ 1380-1388 (lines=9) @@ | ||
| 1377 | ||
| 1378 | $term_id = $do_object ? $term->term_id : (isset($term['term_id']) ? $term['term_id'] : 0); |
|
| 1379 | ||
| 1380 | foreach ( (array) $fields as $field ) { |
|
| 1381 | if ( $do_object ) { |
|
| 1382 | if ( isset($term->$field) ) |
|
| 1383 | $term->$field = sanitize_term_field($field, $term->$field, $term_id, $taxonomy, $context); |
|
| 1384 | } else { |
|
| 1385 | if ( isset($term[$field]) ) |
|
| 1386 | $term[$field] = sanitize_term_field($field, $term[$field], $term_id, $taxonomy, $context); |
|
| 1387 | } |
|
| 1388 | } |
|
| 1389 | ||
| 1390 | if ( $do_object ) |
|
| 1391 | $term->filter = $context; |
|