Ticket #4968: 4968.2.patch
File 4968.2.patch, 3.7 KB (added by , 16 years ago) |
---|
-
wp-includes/deprecated.php
1690 1690 the_author_meta('ID'); 1691 1691 } 1692 1692 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 */ 1705 function make_url_footnote( $content ) { 1706 _deprecated_function(__FUNCTION__, '2.9' ); 1707 } 1708 1693 1709 ?> 1710 No newline at end of file -
wp-includes/feed.php
153 153 * @see get_the_content() For the $more_link_text, $stripteaser, and $more_file 154 154 * parameters. 155 155 * 156 * @param string $more_link_text Optional.Text to display when more content is available but not displayed.157 * @param int|bool $stripteaser Optional.Default is 0.158 * @param string $more_file Optional.159 * @param int $cut Optional.Amount of words to keep for the content.160 * @param int $encode_html Optional. How to encode the content.156 * @param string $more_link_text (optional) Text to display when more content is available but not displayed. 157 * @param int|bool $stripteaser (optional) Default is 0. 158 * @param string $more_file (optional) 159 * @param int $cut (optional) Amount of words to keep for the content. 160 * @param int $encode_html (optional) How to encode the content. 0: as-is, 1: esc_html, 2: strip_tags defaults to 0 161 161 */ 162 162 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { 163 163 $content = get_the_content($more_link_text, $stripteaser, $more_file); 164 164 $content = apply_filters('the_content_rss', $content); 165 165 if ( $cut && !$encode_html ) 166 166 $encode_html = 2; 167 if ( 1 == $encode_html ) {167 if ( 1 == $encode_html ) { 168 168 $content = esc_html($content); 169 169 $cut = 0; 170 } elseif ( 0 == $encode_html ) {171 $content = make_url_footnote($content);172 170 } elseif ( 2 == $encode_html ) { 173 171 $content = strip_tags($content); 174 172 } -
wp-includes/functions.php
965 965 } 966 966 967 967 /** 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 places971 * them at the bottom of the content with numbers.972 *973 * @since 0.71974 *975 * @param string $content Content to get links976 * @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 /**996 968 * Retrieve post title from XMLRPC XML. 997 969 * 998 970 * If the title element is not part of the XML, then the default post title from