From 63a210e7c885d652586c61dbc43e49e49e2aa9dc Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 18:22:16 +0000 Subject: [PATCH] In `wp-includes/bookmark.php`, remove dead code: * In `get_bookmarks()`, `$cache` is set twice before it is used. * In `sanitize_bookmark_field()`, `break` is unreachable after `return` See #27882. Built from https://develop.svn.wordpress.org/trunk@28316 git-svn-id: http://core.svn.wordpress.org/trunk@28144 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index 86ea3d22ae..9932035d84 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -132,7 +132,6 @@ function get_bookmarks($args = '') { $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - $cache = array(); $key = md5( serialize( $r ) ); if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) { if ( is_array($cache) && isset( $cache[ $key ] ) ) { @@ -356,7 +355,7 @@ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) { // We return here so that the categories aren't filtered. // The 'link_category' filter is for the name of a link category, not an array of a link's link categories return $value; - break; + case 'link_visible' : // bool stored as Y|N $value = preg_replace('/[^YNyn]/', '', $value); break;