~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to wp-includes/bookmark.php

  • Committer: Andrew Glen-Young
  • Date: 2011-03-08 14:47:51 UTC
  • Revision ID: andrew.glen-young@canonical.com-20110308144751-1n6spqgayztf9h77
[AGY] import 3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 */
8
8
 
9
9
/**
10
 
 * Retrieve Bookmark data based on ID
 
10
 * Retrieve Bookmark data
11
11
 *
12
12
 * @since 2.1.0
13
13
 * @uses $wpdb Database Object
14
14
 *
15
 
 * @param int $bookmark_id
 
15
 * @param mixed $bookmark
16
16
 * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
17
17
 * @param string $filter Optional, default is 'raw'.
18
18
 * @return array|object Type returned depends on $output value.
334
334
                return $value;
335
335
 
336
336
        if ( 'edit' == $context ) {
337
 
                $format_to_edit = array('link_notes');
338
337
                $value = apply_filters("edit_$field", $value, $bookmark_id);
339
338
 
340
 
                if ( in_array($field, $format_to_edit) ) {
341
 
                        $value = format_to_edit($value);
 
339
                if ( 'link_notes' == $field ) {
 
340
                        $value = esc_html( $value ); // textarea_escaped
342
341
                } else {
343
342
                        $value = esc_attr($value);
344
343
                }