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
This commit is contained in:
Scott Taylor 2014-05-06 18:22:16 +00:00
parent 5f27d149a3
commit 63a210e7c8
1 changed files with 1 additions and 2 deletions

View File

@ -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;