| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
$filters = array('pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', |
|---|
| 17 |
'pre_link_rel', 'pre_user_display_name', 'pre_user_first_name', 'pre_user_last_name', |
|---|
| 18 |
'pre_user_nickname'); |
|---|
| 19 |
foreach ( $filters as $filter ) { |
|---|
| 20 |
add_filter($filter, 'strip_tags'); |
|---|
| 21 |
add_filter($filter, 'trim'); |
|---|
| 22 |
add_filter($filter, 'wp_filter_kses'); |
|---|
| 23 |
add_filter($filter, 'wp_specialchars', 30); |
|---|
| 24 |
} |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
$filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description'); |
|---|
| 28 |
foreach ( $filters as $filter ) { |
|---|
| 29 |
add_filter($filter, 'wp_filter_kses'); |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
$filters = array('pre_comment_author_email', 'pre_user_email'); |
|---|
| 34 |
foreach ( $filters as $filter ) { |
|---|
| 35 |
add_filter($filter, 'trim'); |
|---|
| 36 |
add_filter($filter, 'sanitize_email'); |
|---|
| 37 |
add_filter($filter, 'wp_filter_kses'); |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$filters = array('pre_comment_author_url', 'pre_user_url', 'pre_link_url', 'pre_link_image', |
|---|
| 42 |
'pre_link_rss'); |
|---|
| 43 |
foreach ( $filters as $filter ) { |
|---|
| 44 |
add_filter($filter, 'strip_tags'); |
|---|
| 45 |
add_filter($filter, 'trim'); |
|---|
| 46 |
add_filter($filter, 'sanitize_url'); |
|---|
| 47 |
add_filter($filter, 'wp_filter_kses'); |
|---|
| 48 |
} |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
$filters = array('user_url', 'link_url', 'link_image', 'link_rss', 'comment_url'); |
|---|
| 52 |
foreach ( $filters as $filter ) { |
|---|
| 53 |
add_filter($filter, 'strip_tags'); |
|---|
| 54 |
add_filter($filter, 'trim'); |
|---|
| 55 |
add_filter($filter, 'clean_url'); |
|---|
| 56 |
add_filter($filter, 'wp_filter_kses'); |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
$filters = array('pre_term_slug'); |
|---|
| 61 |
foreach ( $filters as $filter ) { |
|---|
| 62 |
add_filter($filter, 'sanitize_title'); |
|---|
| 63 |
} |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
$filters = array('pre_post_type'); |
|---|
| 67 |
foreach ( $filters as $filter ) { |
|---|
| 68 |
add_filter($filter, 'sanitize_user'); |
|---|
| 69 |
} |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
$filters = array('content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pre_comment_content'); |
|---|
| 73 |
foreach ( $filters as $filter ) { |
|---|
| 74 |
add_filter( $filter, 'balanceTags', 50); |
|---|
| 75 |
} |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
$filters = array('comment_author', 'term_name', 'link_name', 'link_description', |
|---|
| 79 |
'link_notes', 'bloginfo', 'wp_title'); |
|---|
| 80 |
foreach ( $filters as $filter ) { |
|---|
| 81 |
add_filter($filter, 'wptexturize'); |
|---|
| 82 |
add_filter($filter, 'convert_chars'); |
|---|
| 83 |
add_filter($filter, 'wp_specialchars'); |
|---|
| 84 |
} |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
$filters = array('term_description'); |
|---|
| 88 |
foreach ( $filters as $filter ) { |
|---|
| 89 |
add_filter($filter, 'wptexturize'); |
|---|
| 90 |
add_filter($filter, 'convert_chars'); |
|---|
| 91 |
add_filter($filter, 'wpautop'); |
|---|
| 92 |
} |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
$filters = array('term_name_rss'); |
|---|
| 96 |
foreach ( $filters as $filter ) { |
|---|
| 97 |
add_filter($filter, 'convert_chars'); |
|---|
| 98 |
} |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
add_filter('the_title', 'wptexturize'); |
|---|
| 102 |
add_filter('the_title', 'convert_chars'); |
|---|
| 103 |
add_filter('the_title', 'trim'); |
|---|
| 104 |
|
|---|
| 105 |
add_filter('the_content', 'wptexturize'); |
|---|
| 106 |
add_filter('the_content', 'convert_smilies'); |
|---|
| 107 |
add_filter('the_content', 'convert_chars'); |
|---|
| 108 |
add_filter('the_content', 'wpautop'); |
|---|
| 109 |
add_filter('the_content', 'prepend_attachment'); |
|---|
| 110 |
|
|---|
| 111 |
add_filter('the_excerpt', 'wptexturize'); |
|---|
| 112 |
add_filter('the_excerpt', 'convert_smilies'); |
|---|
| 113 |
add_filter('the_excerpt', 'convert_chars'); |
|---|
| 114 |
add_filter('the_excerpt', 'wpautop'); |
|---|
| 115 |
add_filter('get_the_excerpt', 'wp_trim_excerpt'); |
|---|
| 116 |
|
|---|
| 117 |
add_filter('comment_text', 'wptexturize'); |
|---|
| 118 |
add_filter('comment_text', 'convert_chars'); |
|---|
| 119 |
add_filter('comment_text', 'make_clickable', 9); |
|---|
| 120 |
add_filter('comment_text', 'force_balance_tags', 25); |
|---|
| 121 |
add_filter('comment_text', 'convert_smilies', 20); |
|---|
| 122 |
add_filter('comment_text', 'wpautop', 30); |
|---|
| 123 |
|
|---|
| 124 |
add_filter('comment_excerpt', 'convert_chars'); |
|---|
| 125 |
|
|---|
| 126 |
add_filter('list_cats', 'wptexturize'); |
|---|
| 127 |
add_filter('single_post_title', 'wptexturize'); |
|---|
| 128 |
|
|---|
| 129 |
add_filter('wp_sprintf', 'wp_sprintf_l', 10, 2); |
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
add_filter('the_title_rss', 'strip_tags'); |
|---|
| 133 |
add_filter('the_title_rss', 'ent2ncr', 8); |
|---|
| 134 |
add_filter('the_title_rss', 'wp_specialchars'); |
|---|
| 135 |
add_filter('the_content_rss', 'ent2ncr', 8); |
|---|
| 136 |
add_filter('the_excerpt_rss', 'convert_chars'); |
|---|
| 137 |
add_filter('the_excerpt_rss', 'ent2ncr', 8); |
|---|
| 138 |
add_filter('comment_author_rss', 'ent2ncr', 8); |
|---|
| 139 |
add_filter('comment_text_rss', 'ent2ncr', 8); |
|---|
| 140 |
add_filter('comment_text_rss', 'wp_specialchars'); |
|---|
| 141 |
add_filter('bloginfo_rss', 'ent2ncr', 8); |
|---|
| 142 |
add_filter('the_author', 'ent2ncr', 8); |
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
add_filter('option_ping_sites', 'privacy_ping_filter'); |
|---|
| 146 |
add_filter('option_blog_charset', 'wp_specialchars'); |
|---|
| 147 |
add_filter('option_home', '_config_wp_home'); |
|---|
| 148 |
add_filter('option_siteurl', '_config_wp_siteurl'); |
|---|
| 149 |
add_filter('tiny_mce_before_init', '_mce_set_direction'); |
|---|
| 150 |
add_filter('pre_kses', 'wp_pre_kses_less_than'); |
|---|
| 151 |
add_filter('sanitize_title', 'sanitize_title_with_dashes'); |
|---|
| 152 |
add_action('check_comment_flood', 'check_comment_flood_db', 10, 3); |
|---|
| 153 |
add_filter('comment_flood_filter', 'wp_throttle_comment_flood', 10, 3); |
|---|
| 154 |
add_filter('pre_comment_content', 'wp_rel_nofollow', 15); |
|---|
| 155 |
add_filter('comment_email', 'antispambot'); |
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
add_filter('atom_service_url','atom_service_url_filter'); |
|---|
| 159 |
|
|---|
| 160 |
|
|---|
| 161 |
add_action('wp_head', 'rsd_link'); |
|---|
| 162 |
add_action('wp_head', 'wlwmanifest_link'); |
|---|
| 163 |
add_action('wp_head', 'locale_stylesheet'); |
|---|
| 164 |
add_action('publish_future_post', 'check_and_publish_future_post', 10, 1); |
|---|
| 165 |
add_action('wp_head', 'noindex', 1); |
|---|
| 166 |
add_action('wp_head', 'wp_print_scripts'); |
|---|
| 167 |
add_action('wp_head', 'wp_generator'); |
|---|
| 168 |
if(!defined('DOING_CRON')) |
|---|
| 169 |
add_action('init', 'wp_cron'); |
|---|
| 170 |
add_action('do_feed_rdf', 'do_feed_rdf', 10, 1); |
|---|
| 171 |
add_action('do_feed_rss', 'do_feed_rss', 10, 1); |
|---|
| 172 |
add_action('do_feed_rss2', 'do_feed_rss2', 10, 1); |
|---|
| 173 |
add_action('do_feed_atom', 'do_feed_atom', 10, 1); |
|---|
| 174 |
add_action('do_pings', 'do_all_pings', 10, 1); |
|---|
| 175 |
add_action('do_robots', 'do_robots'); |
|---|
| 176 |
add_action('sanitize_comment_cookies', 'sanitize_comment_cookies'); |
|---|
| 177 |
add_action('admin_print_scripts', 'wp_print_scripts', 20); |
|---|
| 178 |
add_action('init', 'smilies_init', 5); |
|---|
| 179 |
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 ); |
|---|
| 180 |
add_action( 'shutdown', 'wp_ob_end_flush_all', 1); |
|---|
| 181 |
add_action('publish_post', '_publish_post_hook', 5, 1); |
|---|
| 182 |
add_action('future_post', '_future_post_hook', 5, 2); |
|---|
| 183 |
add_action('future_page', '_future_post_hook', 5, 2); |
|---|
| 184 |
add_action('save_post', '_save_post_hook', 5, 2); |
|---|
| 185 |
add_action('transition_post_status', '_transition_post_status', 5, 3); |
|---|
| 186 |
add_action('comment_form', 'wp_comment_form_unfiltered_html_nonce'); |
|---|
| 187 |
|
|---|
| 188 |
add_action('template_redirect', 'wp_old_slug_redirect'); |
|---|
| 189 |
add_action('edit_post', 'wp_check_for_changed_slugs'); |
|---|
| 190 |
add_action('edit_form_advanced', 'wp_remember_old_slug'); |
|---|
| 191 |
|
|---|
| 192 |
?> |
|---|
| 193 |
|
|---|