
如何解决XAMPP中的403错误
_make_web_ftp_clickable_cb ( $matches )
_make_web_ftp_clickable_cb: 此函数用于将文章内容中的FTP或基于网络的文件传输的URL转换为可点击的链接。
回调,将URL匹配转换为HTML A元素。
该函数已从2.5.0回传到2.3.2。make_clickable()的Regex回调。
function _make_web_ftp_clickable_cb( $matches ) { $ret = ''; $dest = $matches[2]; $dest = 'http://' . $dest; // Removed trailing [.,;:)] from URL. $last_char = substr( $dest, -1 ); if ( in_array( $last_char, array( '.', ',', ';', ':', ')' ), true ) === true ) { $ret = $last_char; $dest = substr( $dest, 0, strlen( $dest ) - 1 ); } $dest = esc_url( $dest ); if ( empty( $dest ) ) { return $matches[0]; } if ( 'comment_text' === current_filter() ) { $rel = 'nofollow ugc'; } else { $rel = 'nofollow'; } /** This filter is documented in wp-includes/formatting.php */ $rel = apply_filters( 'make_clickable_rel', $rel, $dest ); $rel = esc_attr( $rel ); return $matches[1] . "<a href="$dest" rel="$rel">$dest</a>$ret"; }