> 6) + 192) . chr(($num & 63) + 128); if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128); return ''; } } // Since UTF-8 does not work in PHP4 ( http://us2.php.net/manual/en/function.html-entity-decode.php ) : if (!function_exists('add_to_any_html_entity_decode_utf8')) { function add_to_any_html_entity_decode_utf8($string) { static $trans_tbl; // replace numeric entities $string = preg_replace('~&#x([0-9a-f]+);~ei', 'add_to_any_code2utf(hexdec("\\1"))', $string); $string = preg_replace('~&#([0-9]+);~e', 'add_to_any_code2utf(\\1)', $string); // replace literal entities if (!isset($trans_tbl)) { $trans_tbl = array(); foreach (get_html_translation_table(HTML_ENTITIES) as $val=>$key) $trans_tbl[$key] = utf8_encode($val); } return strtr($string, $trans_tbl); } } function add_to_any_link() { ob_start(); $sitename_enc = rawurlencode( get_bloginfo('name') ); $siteurl_enc = rawurlencode( trailingslashit( get_bloginfo('url') ) ); $linkname = add_to_any_html_entity_decode_utf8( get_the_title() ); $linkname_enc = rawurlencode( $linkname ); $linkurl = get_permalink($post->ID); $linkurl_enc = rawurlencode( $linkurl ); ?> Bookmark '.add_to_any_link('return').'

'; return $content; } add_action('the_content', 'a2a_add_to_any_to_content'); add_action('the_content_rss', 'a2a_add_to_any_to_content'); ?>