From 6185986c0ebeb83f726a06407c0ffc0f9c3ba0c1 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 21 Jul 2011 21:41:21 +0000 Subject: [PATCH] Add pre_ent2ncr filter. props GaryJ, fixes #16432. git-svn-id: http://svn.automattic.com/wordpress/trunk@18456 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 82a1b9bdf..311cd5f5e 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( '"' => '"', '&' => '&',