Changeset 45667 for trunk/src/wp-admin/includes/bookmark.php
- Timestamp:
- 07/25/2019 12:47:53 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/bookmark.php
r43598 r45667 163 163 ); 164 164 165 $ args = wp_parse_args( $linkdata, $defaults );166 $ r = wp_unslash( sanitize_bookmark( $args, 'db' ) );167 168 $link_id = $ r['link_id'];169 $link_name = $ r['link_name'];170 $link_url = $ r['link_url'];165 $parsed_args = wp_parse_args( $linkdata, $defaults ); 166 $parsed_args = wp_unslash( sanitize_bookmark( $parsed_args, 'db' ) ); 167 168 $link_id = $parsed_args['link_id']; 169 $link_name = $parsed_args['link_name']; 170 $link_url = $parsed_args['link_url']; 171 171 172 172 $update = false; … … 187 187 } 188 188 189 $link_rating = ( ! empty( $ r['link_rating'] ) ) ? $r['link_rating'] : 0;190 $link_image = ( ! empty( $ r['link_image'] ) ) ? $r['link_image'] : '';191 $link_target = ( ! empty( $ r['link_target'] ) ) ? $r['link_target'] : '';192 $link_visible = ( ! empty( $ r['link_visible'] ) ) ? $r['link_visible'] : 'Y';193 $link_owner = ( ! empty( $ r['link_owner'] ) ) ? $r['link_owner'] : get_current_user_id();194 $link_notes = ( ! empty( $ r['link_notes'] ) ) ? $r['link_notes'] : '';195 $link_description = ( ! empty( $ r['link_description'] ) ) ? $r['link_description'] : '';196 $link_rss = ( ! empty( $ r['link_rss'] ) ) ? $r['link_rss'] : '';197 $link_rel = ( ! empty( $ r['link_rel'] ) ) ? $r['link_rel'] : '';198 $link_category = ( ! empty( $ r['link_category'] ) ) ? $r['link_category'] : array();189 $link_rating = ( ! empty( $parsed_args['link_rating'] ) ) ? $parsed_args['link_rating'] : 0; 190 $link_image = ( ! empty( $parsed_args['link_image'] ) ) ? $parsed_args['link_image'] : ''; 191 $link_target = ( ! empty( $parsed_args['link_target'] ) ) ? $parsed_args['link_target'] : ''; 192 $link_visible = ( ! empty( $parsed_args['link_visible'] ) ) ? $parsed_args['link_visible'] : 'Y'; 193 $link_owner = ( ! empty( $parsed_args['link_owner'] ) ) ? $parsed_args['link_owner'] : get_current_user_id(); 194 $link_notes = ( ! empty( $parsed_args['link_notes'] ) ) ? $parsed_args['link_notes'] : ''; 195 $link_description = ( ! empty( $parsed_args['link_description'] ) ) ? $parsed_args['link_description'] : ''; 196 $link_rss = ( ! empty( $parsed_args['link_rss'] ) ) ? $parsed_args['link_rss'] : ''; 197 $link_rel = ( ! empty( $parsed_args['link_rel'] ) ) ? $parsed_args['link_rel'] : ''; 198 $link_category = ( ! empty( $parsed_args['link_category'] ) ) ? $parsed_args['link_category'] : array(); 199 199 200 200 // Make sure we set a valid category.
Note: See TracChangeset
for help on using the changeset viewer.