Changeset 2240 for trunk/wp-includes/vars.php
- Timestamp:
- 02/07/2005 07:46:41 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/vars.php
r2239 r2240 39 39 // if the config file does not provide the smilies array, let's define it here 40 40 if (!isset($wpsmiliestrans)) { 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 41 $wpsmiliestrans = array( 42 ' :)' => 'icon_smile.gif', 43 ' :D' => 'icon_biggrin.gif', 44 ' :-D' => 'icon_biggrin.gif', 45 ':grin:' => 'icon_biggrin.gif', 46 ' :)' => 'icon_smile.gif', 47 ' :-)' => 'icon_smile.gif', 48 ':smile:' => 'icon_smile.gif', 49 ' :(' => 'icon_sad.gif', 50 ' :-(' => 'icon_sad.gif', 51 ':sad:' => 'icon_sad.gif', 52 ' :o' => 'icon_surprised.gif', 53 ' :-o' => 'icon_surprised.gif', 54 ':eek:' => 'icon_surprised.gif', 55 ' 8O' => 'icon_eek.gif', 56 ' 8-O' => 'icon_eek.gif', 57 ':shock:' => 'icon_eek.gif', 58 ' :?' => 'icon_confused.gif', 59 ' :-?' => 'icon_confused.gif', 60 ' :???:' => 'icon_confused.gif', 61 ' 8)' => 'icon_cool.gif', 62 ' 8-)' => 'icon_cool.gif', 63 ':cool:' => 'icon_cool.gif', 64 ':lol:' => 'icon_lol.gif', 65 ' :x' => 'icon_mad.gif', 66 ' :-x' => 'icon_mad.gif', 67 ':mad:' => 'icon_mad.gif', 68 ' :P' => 'icon_razz.gif', 69 ' :-P' => 'icon_razz.gif', 70 ':razz:' => 'icon_razz.gif', 71 ':oops:' => 'icon_redface.gif', 72 ':cry:' => 'icon_cry.gif', 73 ':evil:' => 'icon_evil.gif', 74 ':twisted:' => 'icon_twisted.gif', 75 ':roll:' => 'icon_rolleyes.gif', 76 ':wink:' => 'icon_wink.gif', 77 ' ;)' => 'icon_wink.gif', 78 ' ;-)' => 'icon_wink.gif', 79 ':!:' => 'icon_exclaim.gif', 80 ':?:' => 'icon_question.gif', 81 ':idea:' => 'icon_idea.gif', 82 ':arrow:' => 'icon_arrow.gif', 83 ' :|' => 'icon_neutral.gif', 84 ' :-|' => 'icon_neutral.gif', 85 ':neutral:' => 'icon_neutral.gif', 86 ':mrgreen:' => 'icon_mrgreen.gif', 87 ); 88 88 } 89 89 90 90 // sorts the smilies' array 91 91 if (!function_exists('smiliescmp')) { 92 93 94 95 96 92 function smiliescmp ($a, $b) { 93 if (strlen($a) == strlen($b)) { 94 return strcmp($a, $b); 95 } 96 return (strlen($a) > strlen($b)) ? -1 : 1; 97 97 } 98 98 } … … 110 110 define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_settings('siteurl') . '/' ) ); 111 111 112 // Some default filters113 add_filter('bloginfo','wp_specialchars');114 add_filter('category_description', 'wptexturize');115 add_filter('list_cats', 'wptexturize');116 add_filter('comment_author', 'wptexturize');117 add_filter('comment_text', 'wptexturize');118 add_filter('single_post_title', 'wptexturize');119 add_filter('the_title', 'wptexturize');120 add_filter('the_content', 'wptexturize');121 add_filter('the_excerpt', 'wptexturize');122 add_filter('bloginfo', 'wptexturize');123 124 // Comments, trackbacks, pingbacks125 add_filter('pre_comment_author_name', 'strip_tags');126 add_filter('pre_comment_author_name', 'trim');127 add_filter('pre_comment_author_name', 'wp_specialchars', 30);128 129 add_filter('pre_comment_author_email', 'trim');130 add_filter('pre_comment_author_email', 'sanitize_email');131 132 add_filter('pre_comment_author_url', 'strip_tags');133 add_filter('pre_comment_author_url', 'trim');134 add_filter('pre_comment_author_url', 'clean_url');135 136 add_filter('pre_comment_content', 'stripslashes', 1);137 add_filter('pre_comment_content', 'wp_filter_kses');138 add_filter('pre_comment_content', 'wp_rel_nofollow', 15);139 add_filter('pre_comment_content', 'balanceTags', 30);140 add_filter('pre_comment_content', 'addslashes', 50);141 142 add_filter('pre_comment_author_name', 'wp_filter_kses');143 add_filter('pre_comment_author_email', 'wp_filter_kses');144 add_filter('pre_comment_author_url', 'wp_filter_kses');145 146 // Default filters for these functions147 add_filter('comment_author', 'wptexturize');148 add_filter('comment_author', 'convert_chars');149 add_filter('comment_author', 'wp_specialchars');150 151 add_filter('comment_email', 'antispambot');152 153 add_filter('comment_url', 'clean_url');154 155 add_filter('comment_text', 'convert_chars');156 add_filter('comment_text', 'make_clickable');157 add_filter('comment_text', 'wpautop', 30);158 add_filter('comment_text', 'convert_smilies', 20);159 160 add_filter('comment_text_rss', 'htmlspecialchars');161 162 add_filter('comment_excerpt', 'convert_chars');163 add_filter('the_excerpt_rss', 'convert_chars');164 165 // Places to balance tags on input166 add_filter('content_save_pre', 'balanceTags', 50);167 add_filter('excerpt_save_pre', 'balanceTags', 50);168 add_filter('comment_save_pre', 'balanceTags', 50);169 170 112 ?>
Note: See TracChangeset
for help on using the changeset viewer.