From ac3ab55d1ed166cc9c175083debee81d30914178 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 21 Jul 2011 21:41:21 +0000 Subject: [PATCH] Add pre_ent2ncr filter. props GaryJ, fixes #16432. git-svn-id: https://develop.svn.wordpress.org/trunk@18456 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 82a1b9bdf7..311cd5f5eb 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1875,6 +1875,10 @@ function wp_trim_excerpt($text) { * @return string Text with converted entities. */ function ent2ncr($text) { + + if( null !== $filtered = apply_filters( 'pre_ent2ncr', null, $text ) ) + return $filtered; + $to_ncr = array( '"' => '"', '&' => '&',