WordPress.org

Make WordPress Core

Ticket #12480: 12480.diff

File 12480.diff, 1.3 KB (added by technosailor, 8 years ago)

Refreshed, simplified and enhanced for 3.0

  • wp-includes/default-filters.php

     
    128128add_filter( 'comment_text', 'convert_chars'          );
    129129add_filter( 'comment_text', 'make_clickable',      9 );
    130130add_filter( 'comment_text', 'force_balance_tags', 25 );
     131add_filter( 'comment_text', 'fill_empty_links',   24 );
    131132add_filter( 'comment_text', 'convert_smilies',    20 );
    132133add_filter( 'comment_text', 'wpautop',            30 );
    133134
  • wp-includes/formatting.php

     
    10941094}
    10951095
    10961096/**
     1097 * Adds blank string to all HTML A empty elements in content.
     1098 *
     1099 * @since 3.0.0
     1100 *
     1101 * @param string $text Content that may contain HTML A elements.
     1102 * @return string Converted content.
     1103 */
     1104function fill_empty_links( $text )
     1105{
     1106        return preg_replace_callback( '#<a (.+?)>[\s|\&nbsp;]*</a>#i', create_function('$matches','if( $matches[1] ) return "<a $matches[1] >blank</a>";'), $text);
     1107}
     1108
     1109/**
    10971110 * Acts on text which is about to be edited.
    10981111 *
    10991112 * Unless $richedit is set, it is simply a holder for the 'format_to_edit'