Code Duplication    Length = 4-5 lines in 4 locations

src/wp-includes/bookmark.php 1 location

@@ 400-404 (lines=5) @@
397
		/** This filter is documented in wp-includes/post.php */
398
		$value = apply_filters( "{$field}", $value, $bookmark_id, $context );
399
400
		if ( 'attribute' == $context ) {
401
			$value = esc_attr( $value );
402
		} elseif ( 'js' == $context ) {
403
			$value = esc_js( $value );
404
		}
405
	}
406
407
	return $value;

src/wp-includes/post.php 1 location

@@ 2069-2072 (lines=4) @@
2066
			$value = apply_filters( "post_{$field}", $value, $post_id, $context );
2067
		}
2068
2069
		if ( 'attribute' == $context ) {
2070
			$value = esc_attr( $value );
2071
		} elseif ( 'js' == $context ) {
2072
			$value = esc_js( $value );
2073
		}
2074
	}
2075

src/wp-includes/taxonomy.php 1 location

@@ 1561-1565 (lines=5) @@
1558
		$value = apply_filters( "{$taxonomy}_{$field}", $value, $term_id, $context );
1559
	}
1560
1561
	if ( 'attribute' == $context ) {
1562
		$value = esc_attr($value);
1563
	} elseif ( 'js' == $context ) {
1564
		$value = esc_js($value);
1565
	}
1566
	return $value;
1567
}
1568

src/wp-includes/user.php 1 location

@@ 1243-1247 (lines=5) @@
1240
	if ( 'user_url' == $field )
1241
		$value = esc_url($value);
1242
1243
	if ( 'attribute' == $context ) {
1244
		$value = esc_attr( $value );
1245
	} elseif ( 'js' == $context ) {
1246
		$value = esc_js( $value );
1247
	}
1248
	return $value;
1249
}
1250