Make WordPress Core


Ignore:
Timestamp:
12/01/2009 07:46:36 AM (15 years ago)
Author:
azaozz
Message:

Separate the removal of <p> wrapping from shortcodes into another function and apply it with different filter, props miqrogroove, props mdawaffe, see #11257, see #11249

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r12126 r12302  
    8989// Format text area for display.
    9090foreach ( array( 'term_description' ) as $filter ) {
    91     add_filter( $filter, 'wptexturize'   );
    92     add_filter( $filter, 'convert_chars' );
    93     add_filter( $filter, 'wpautop'       );
     91    add_filter( $filter, 'wptexturize'      );
     92    add_filter( $filter, 'convert_chars'    );
     93    add_filter( $filter, 'wpautop'          );
     94    add_filter( $filter, 'shortcode_unautop');
    9495}
    9596
     
    108109add_filter( 'the_content', 'convert_chars'      );
    109110add_filter( 'the_content', 'wpautop'            );
     111add_filter( 'the_content', 'shortcode_unautop'  );
    110112add_filter( 'the_content', 'prepend_attachment' );
    111113
    112 add_filter( 'the_excerpt',     'wptexturize'     );
    113 add_filter( 'the_excerpt',     'convert_smilies' );
    114 add_filter( 'the_excerpt',     'convert_chars'   );
    115 add_filter( 'the_excerpt',     'wpautop'         );
    116 add_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
     114add_filter( 'the_excerpt',     'wptexturize'      );
     115add_filter( 'the_excerpt',     'convert_smilies'  );
     116add_filter( 'the_excerpt',     'convert_chars'    );
     117add_filter( 'the_excerpt',     'wpautop'          );
     118add_filter( 'the_excerpt',     'shortcode_unautop');
     119add_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );
    117120
    118121add_filter( 'comment_text', 'wptexturize'            );
Note: See TracChangeset for help on using the changeset viewer.