関数 _make_web_ftp_clickable_cb()
2014/12/11
関数 _make_web_ftp_clickable_cb()
定義ファイル :/blog/wp-includes/formatting.php 4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function _make_web_ftp_clickable_cb($matches) { $ret = ''; $dest = $matches[2]; $dest = 'http://' . $dest; $dest = esc_url($dest); if ( empty($dest) ) return $matches[0]; // removed trailing [.,;:)] from URL if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) { $ret = substr($dest, -1); $dest = substr($dest, 0, strlen($dest)-1); } return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret"; } |