The other day I had made a tweak to the TechnoTag plugin for
I went into the plugin editor once more and made a
/(“[^"]*?”|’[^']*?’|[^"', ]+)/
For anyone who uses the plugin, you may find the following code useful:
2 global $ttag_image, $ttag_link;
3 $ttaglist = get_post_custom_values(‘ttaglist’);
4 $ttagvals = get_post_custom_values(‘ttag’);
5 if(!empty($ttaglist)) {
6 preg_match_all(“/(\”[^\"]*?\”|’[^']*?’|[^\"', ]+)/”, $ttaglist[0], $ttags);
7 $ttags = array_merge($ttags[0], $ttagvals);
8 } else {
9 $ttags = $ttagvals;
10 }
11 if(!empty($ttags)) {
12 $ttags_list = ‘<span class=”Tags” title=”Technorati Tags”>’;
13 $ttags_list .= ‘<a href=”http://www.technorati.com/help/tags.html”>’;
14 $ttags_list .= ‘<img src=”‘ . $ttag_image . ‘” alt=”Technorati Tags” style=”vertical-align:middle;padding-left:3px;padding-right:3px;” /></a> Tags: ‘;
15 foreach ($ttags as $ttag) {
16 $ttag = trim($ttag, “, \t\r\n\0\x0B’\”");
17 $ttags_list .= ‘<a href=”‘ . $ttag_link . urlencode($ttag) . ‘” rel=”tag”>’;
18 $ttags_list .= htmlentities($ttag).‘</a>, ‘;
19 }
20 $ttags_list = rtrim($ttags_list, ‘, ‘);
21 $ttags_list .= ‘</span>’;
22 $text .= $ttags_list;
23 }
24 return $text;
25 }