Make WordPress Core

Ticket #4968: 4968.patch

File 4968.patch, 2.2 KB (added by hakre, 15 years ago)
  • wp-includes/deprecated.php

     
    16901690        the_author_meta('ID');
    16911691}
    16921692
     1693/**
     1694 * Strip HTML and put links at the bottom of stripped content.
     1695 *
     1696 * Searches for all of the links, strips them out of the content, and places
     1697 * them at the bottom of the content with numbers.
     1698 *
     1699 * @since 0.71
     1700 * @deprecated 2.9
     1701 *
     1702 * @param string $content Content to get links
     1703 * @return string HTML stripped out of content with links at the bottom.
     1704 */
     1705function make_url_footnote( $content ) {
     1706        _deprecated_function(__FUNCTION__, '2.9' );     
     1707}
     1708
    16931709?>
     1710 No newline at end of file
  • wp-includes/functions.php

     
    965965}
    966966
    967967/**
    968  * Strip HTML and put links at the bottom of stripped content.
    969  *
    970  * Searches for all of the links, strips them out of the content, and places
    971  * them at the bottom of the content with numbers.
    972  *
    973  * @since 0.71
    974  *
    975  * @param string $content Content to get links
    976  * @return string HTML stripped out of content with links at the bottom.
    977  */
    978 function make_url_footnote( $content ) {
    979         preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
    980         $links_summary = "\n";
    981         for ( $i=0; $i<count($matches[0]); $i++ ) {
    982                 $link_match = $matches[0][$i];
    983                 $link_number = '['.($i+1).']';
    984                 $link_url = $matches[2][$i];
    985                 $link_text = $matches[4][$i];
    986                 $content = str_replace( $link_match, $link_text . ' ' . $link_number, $content );
    987                 $link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://' ) ) ? get_option( 'home' ) . $link_url : $link_url;
    988                 $links_summary .= "\n" . $link_number . ' ' . $link_url;
    989         }
    990         $content  = strip_tags( $content );
    991         $content .= $links_summary;
    992         return $content;
    993 }
    994 
    995 /**
    996968 * Retrieve post title from XMLRPC XML.
    997969 *
    998970 * If the title element is not part of the XML, then the default post title from