Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r12257 r12042  
    17571757}
    17581758
    1759 /**
    1760  * Strip HTML and put links at the bottom of stripped content.
    1761  *
    1762  * Searches for all of the links, strips them out of the content, and places
    1763  * them at the bottom of the content with numbers.
    1764  *
    1765  * @since 0.71
    1766  * @deprecated 2.9.0
    1767  *
    1768  * @param string $content Content to get links
    1769  * @return string HTML stripped out of content with links at the bottom.
    1770  */
    1771 function make_url_footnote( $content ) {
    1772     _deprecated_function(__FUNCTION__, '2.9', '' );
    1773     preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
    1774     $links_summary = "\n";
    1775     for ( $i=0; $i<count($matches[0]); $i++ ) {
    1776         $link_match = $matches[0][$i];
    1777         $link_number = '['.($i+1).']';
    1778         $link_url = $matches[2][$i];
    1779         $link_text = $matches[4][$i];
    1780         $content = str_replace( $link_match, $link_text . ' ' . $link_number, $content );
    1781         $link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://' ) ) ? get_option( 'home' ) . $link_url : $link_url;
    1782         $links_summary .= "\n" . $link_number . ' ' . $link_url;
    1783     }
    1784     $content  = strip_tags( $content );
    1785     $content .= $links_summary;
    1786     return $content;
    1787 }
    1788 
    1789 /**
    1790  * Retrieve translated string with vertical bar context
    1791  *
    1792  * Quite a few times, there will be collisions with similar translatable text
    1793  * found in more than two places but with different translated context.
    1794  *
    1795  * In order to use the separate contexts, the _c() function is used and the
    1796  * translatable string uses a pipe ('|') which has the context the string is in.
    1797  *
    1798  * When the translated string is returned, it is everything before the pipe, not
    1799  * including the pipe character. If there is no pipe in the translated text then
    1800  * everything is returned.
    1801  *
    1802  * @since 2.2.0
    1803  * @deprecated 2.9.0
    1804  *
    1805  * @param string $text Text to translate
    1806  * @param string $domain Optional. Domain to retrieve the translated text
    1807  * @return string Translated context string without pipe
    1808  */
    1809 function _c( $text, $domain = 'default' ) {
    1810     _deprecated_function(__FUNCTION__, '2.9', '_x' );
    1811     return translate_with_context( $text, $domain );
    1812 }
    18131759?>
Note: See TracChangeset for help on using the changeset viewer.