X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b137f4ce021b4022c56f452c2eafa7abfcef0a7c..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-includes/bookmark.php?ds=sidebyside diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index e1184231..8248e3a6 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -101,9 +101,9 @@ function get_bookmark_field( $field, $bookmark, $context = 'display' ) { * links marked as 'invisible'. * 'show_updated' - Default is 0 (integer). Will show the time of when the * bookmark was last updated. - * 'include' - Default is empty string (string). Include other categories + * 'include' - Default is empty string (string). Include bookmark ID(s) * separated by commas. - * 'exclude' - Default is empty string (string). Exclude other categories + * 'exclude' - Default is empty string (string). Exclude bookmark ID(s) * separated by commas. * * @since 2.1.0 @@ -227,8 +227,11 @@ function get_bookmarks($args = '') { $orderparams = array(); foreach ( explode(',', $orderby) as $ordparam ) { $ordparam = trim($ordparam); - if ( in_array( $ordparam, array( 'name', 'url', 'visible', 'rating', 'owner', 'updated' ) ) ) + $keys = array( 'link_id', 'link_name', 'link_url', 'link_visible', 'link_rating', 'link_owner', 'link_updated', 'link_notes' ); + if ( in_array( 'link_' . $ordparam, $keys ) ) $orderparams[] = 'link_' . $ordparam; + elseif ( in_array( $ordparam, $keys ) ) + $orderparams[] = $ordparam; } $orderby = implode(',', $orderparams); } @@ -372,9 +375,8 @@ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) { * @since 2.7.0 * @uses wp_cache_delete() Deletes the contents of 'get_bookmarks' */ -function clean_bookmark_cache($bookmark_id) { +function clean_bookmark_cache( $bookmark_id ) { wp_cache_delete( $bookmark_id, 'bookmark' ); wp_cache_delete( 'get_bookmarks', 'bookmark' ); + clean_object_term_cache( $bookmark_id, 'link'); } - -?>