PluginProbe
Hotfix / 0.2
Hotfix v0.2
trunk 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4
hotfix / hotfix.php

hotfix.php in Hotfix 0.2, at hotfix.php

33 lines 736 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Hotfix
4 Description: Provides "hotfixes" for annoying WordPress bugs, so you don't have to wait for the next WordPress core release. Keep the plugin updated!
5 Version: 0.2
6 Author: Mark Jaquith
7 Author URI: http://coveredwebservices.com/
8 */
9
10 function wp_hotfix_init() {
11 global $wp_version;
12
13 switch ( $wp_version ) {
14 case '3.0.5' :
15 $hotfixes = array( '305_comment_text_kses' );
16 break;
17 }
18
19 foreach ( $hotfixes as $hotfix ) {
20 call_user_func( 'wp_hotfix_' . $hotfix );
21 }
22 }
23
24 add_action( 'init', 'wp_hotfix_init' );
25
26 /* And now, the hotfixes */
27
28 function wp_hotfix_305_comment_text_kses() {
29 remove_filter( 'comment_text', 'wp_kses_data' );
30 if ( is_admin() )
31 add_filter( 'comment_text', 'wp_kses_post' );
32 }
33