Changeset 8600 for trunk/wp-includes/formatting.php
- Timestamp:
- 08/09/2008 05:36:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r8589 r8600 845 845 if ( '' == $text ) { 846 846 $text = get_the_content(''); 847 848 $text = strip_shortcodes( $text ); 849 847 848 $text = strip_shortcodes( $text ); 849 850 850 $text = apply_filters('the_content', $text); 851 851 $text = str_replace(']]>', ']]>', $text); … … 1437 1437 function links_add_base_url( $content, $base, $attrs = array('src', 'href') ) { 1438 1438 $attrs = implode('|', (array)$attrs); 1439 return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i", 1439 return preg_replace_callback("!($attrs)=(['\"])(.+?)\\2!i", 1440 1440 create_function('$m', 'return _links_add_base($m, "' . $base . '");'), 1441 1441 $content); … … 1456 1456 function _links_add_base($m, $base) { 1457 1457 //1 = attribute name 2 = quotation mark 3 = URL 1458 return $m[1] . '=' . $m[2] . 1458 return $m[1] . '=' . $m[2] . 1459 1459 (strpos($m[3], 'http://') === false ? 1460 1460 path_join($base, $m[3]) : … … 1466 1466 * Adds a Target attribute to all links in passed content. 1467 1467 * 1468 * This function by default only applies to <a> tags, 1468 * This function by default only applies to <a> tags, 1469 1469 * however this can be modified by the 3rd param. 1470 1470 * NOTE: Any current target attributed will be striped and replaced. … … 1480 1480 function links_add_target( $content, $target = '_blank', $tags = array('a') ) { 1481 1481 $tags = implode('|', (array)$tags); 1482 return preg_replace_callback("!<($tags)(.+?)>!i", 1482 return preg_replace_callback("!<($tags)(.+?)>!i", 1483 1483 create_function('$m', 'return _links_add_target($m, "' . $target . '");'), 1484 1484 $content);
Note: See TracChangeset
for help on using the changeset viewer.