From 820a24aa60d48555f522f646ca6025cb18d00e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 3 Nov 2014 17:47:13 -0500 Subject: [PATCH] jqueryui.com: Add category-links tag Ref jquery/jqueryui.com#87 --- mu-plugins/jqueryui.com/jquery-filters.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mu-plugins/jqueryui.com/jquery-filters.php b/mu-plugins/jqueryui.com/jquery-filters.php index 742a440b..6ba5a62f 100644 --- a/mu-plugins/jqueryui.com/jquery-filters.php +++ b/mu-plugins/jqueryui.com/jquery-filters.php @@ -57,4 +57,20 @@ return $content[ 0 ] . $demoContent . $content[ 1 ]; } ); +add_filter( 'the_content', function( $content ) { + $output = array(); + $parts = preg_split( '/()/', $content, -1, PREG_SPLIT_DELIM_CAPTURE ); + + foreach( $parts as $part ) { + if ( !preg_match( '//', $part, $matches ) ) { + $output[] = $part; + continue; + } + + $output[] = ""; + } + + return implode( $output ); +} ); + ?>