Changeset 4640
- Timestamp:
- 12/23/2012 01:44:46 AM (13 years ago)
- Location:
- trunk/includes
- Files:
-
- 2 edited
-
common/kses.php (modified) (1 diff)
-
core/filters.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/kses.php
r4606 r4640 89 89 return wp_kses( $data , bbp_kses_allowed_tags() ); 90 90 } 91 92 /** Formatting ****************************************************************/ 93 94 /** 95 * Filter the content of topics and replies, and turn the value of pre and code 96 * tags into entities where appropriate. 97 * 98 * @since bbPress (r4639) 99 * 100 * @param string $content 101 * @return string 102 */ 103 function bbp_pre_code_tags( $content = '' ) { 104 return preg_replace_callback( '/<pre.*?>(.*?)<\/pre>/imsu', '_bbp_pre_entities_callback', $content ); 105 } 106 107 /** 108 * Callback used by bbp_pre_code_tags() 109 * 110 * @since bbPress (r4639) 111 * 112 * @internal Used by bbp_improve_pre_code_tags() to make code into entities 113 * 114 * @param string $matches 115 * @return string 116 */ 117 function _bbp_pre_entities_callback( $matches = array() ) { 118 return str_replace( $matches[1], htmlentities( $matches[1] ), $matches[0] ); 119 } -
trunk/includes/core/filters.php
r4636 r4640 125 125 add_filter( 'bbp_get_reply_content', 'make_clickable', 9 ); 126 126 add_filter( 'bbp_get_reply_content', 'capital_P_dangit', 10 ); 127 add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 ); 128 add_filter( 'bbp_get_reply_content', 'bbp_pre_code_tags', 25 ); 127 129 add_filter( 'bbp_get_reply_content', 'force_balance_tags', 25 ); 128 add_filter( 'bbp_get_reply_content', 'convert_smilies', 20 );129 130 add_filter( 'bbp_get_reply_content', 'wpautop', 30 ); 130 131 add_filter( 'bbp_get_reply_content', 'bbp_mention_filter', 40 ); … … 135 136 add_filter( 'bbp_get_topic_content', 'make_clickable', 9 ); 136 137 add_filter( 'bbp_get_topic_content', 'capital_P_dangit', 10 ); 138 add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 ); 139 add_filter( 'bbp_get_topic_content', 'bbp_pre_code_tags', 25 ); 137 140 add_filter( 'bbp_get_topic_content', 'force_balance_tags', 25 ); 138 add_filter( 'bbp_get_topic_content', 'convert_smilies', 20 );139 141 add_filter( 'bbp_get_topic_content', 'wpautop', 30 ); 140 142 add_filter( 'bbp_get_topic_content', 'bbp_mention_filter', 40 );
Note: See TracChangeset
for help on using the changeset viewer.