make_url_footnote [ WordPress Function ]
make_url_footnote ( $content )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_footer, core_update_footer, type_url_form_file, _make_url_clickable_cb, url_shorten
Strip HTML and put links at the bottom of stripped content.
Searches for all of the links, strips them out of the content, and places them at the bottom of the content with numbers.
Source
<?php
function make_url_footnote( $content ) {
_deprecated_function( __FUNCTION__, '2.9', '' );
preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
$links_summary = "\n";
for ( $i=0; $i<count($matches[0]); $i++ ) {
$link_match = $matches[0][$i];
$link_number = '['.($i+1).']';
$link_url = $matches[2][$i];
$link_text = $matches[4][$i];
$content = str_replace( $link_match, $link_text . ' ' . $link_number, $content );
$link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://' ) ) ? get_option( 'home' ) . $link_url : $link_url;
$links_summary .= "\n" . $link_number . ' ' . $link_url;
}
$content = strip_tags( $content );
$content .= $links_summary;
return $content;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/make url footnote « WordPress Codex
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions.
codex.wordpress.org - WordPress › Support » Please help, my blog is down!
Fatal error: Cannot redeclare make_url_footnote() (previously declared in /home/ content/r/o/c/rockydesi/html/blog/wp-includes/functions.php:978) in ...
wordpress.org - make_url_footnote() WordPress function reference, arguments and ...
Strip HTML and put links at the bottom of stripped content.
queryposts.com - 常用函数-make_url_footnote() | WordPress啦!
2009年10月26日 ... <?php make_url_footnote( $content ) ?> 参数. $content. (字符串)( ... 源文件. make_url_footnote()位于wp-includes/functions.php中。 相关资源 ...
www.wordpress.la