WordPress.org

Make WordPress Core

Ticket #19524: hotfix-patch.2.diff

File hotfix-patch.2.diff, 3.4 KB (added by markjaquith, 2 years ago)

Updated with proposed (untested) fix for #19510

  • hotfix.php

     
    22/* 
    33Plugin Name: Hotfix 
    44Description: Provides "hotfixes" for selected WordPress bugs, so you don't have to wait for the next WordPress core release. Keep the plugin updated! 
    5 Version: 0.6 
     5Version: 0.8 
    66Author: Mark Jaquith 
    77Author URI: http://coveredwebservices.com/ 
    88*/ 
     
    3434        $hotfixes = array(); 
    3535 
    3636        switch ( $wp_version ) { 
     37                case '3.3' : 
     38                        $hotfixes = array( '33_no_wp_print_styles_in_admin' ); 
     39                        if ( !defined( 'CONCATENATE_SCRIPTS' ) ) 
     40                                define( 'CONCATENATE_SCRIPTS', false ); 
     41                        break; 
    3742                case '3.1.3' : 
    3843                        $hotfixes = array( '313_post_status_query_string' ); 
    3944                        break; 
     
    111116                        $data = get_object_vars($data); 
    112117                return is_array($data) ? array_map(__FUNCTION__, $data) : $data; 
    113118        } 
     119} 
     120 
     121function wp_hotfix_33_no_wp_print_styles_in_admin() { 
     122        add_action( 'in_admin_header', 'wp_hotfix_33_no_wp_print_styles_in_admin_remove', 999 ); 
     123} 
     124 
     125function wp_hotfix_33_no_wp_print_styles_in_admin_remove() { 
     126        remove_all_actions( 'wp_print_styles' ); 
    114127} 
     128 No newline at end of file 
  • readme.txt

     
    11=== Hotfix === 
    2 Contributors: markjaquith 
     2Contributors: markjaquith, nacin 
    33Tags: hotfix, bugs, wordpress, update 
    44Requires at least: 3.0 
    5 Tested up to: 3.2.1 
     5Tested up to: 3.3 
    66Stable tag: 0.7 
    77 
    88Provides unofficial fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release. 
     
    1212This unofficial plugin provides fixes for selected WordPress bugs, so you don't have to wait for the next WordPress core release. **This does not mean you can stop updating WordPress!** It just means that you'll get a few selected fixes more quickly. 
    1313 
    1414Recent fixes: 
     15* **WordPress 3.3** 
     16        * Work around a bug for people without built-in JSON support 
    1517 
    1618* **WordPress 3.2** 
    1719        * Include JSON support for people with funky PHP setups 
    1820 
    19 * **WordPress 3.1.3** 
    20         * Fix a bug that caused `post_status` to malfunction if passed an array 
    21  
    22 * **WordPress 3.1** 
    23         * Fix a bug that caused some taxonomy query manipulations (like excluding categories) to not work like they did before. 
    24  
    25 * **WordPress 3.0.5** 
    26         * Prevent KSES from overzealously stripping images and other advanced HTML from Administrator/Editor comments on display. 
    27  
    2821Fixes are specific to your version of WordPress. It may be that your version of WordPress has no fixes. That's fine. Keep the plugin activated and updated, in case you need it for a subsequent version of WordPress! 
    2922 
    3023== Installation == 
     
    4033Read the "Complete Hotfix List" section in the description. A later version of the plugin may list the hotfixes in a special WordPress admin page. 
    4134 
    4235== Changelog == 
     36= 0.8 = 
     37* Include JSON support for load-scripts.php 
    4338= 0.7 = 
    4439* Fix issue in version 0.6 
    4540 
     
    6560* Hotfix for WP 3.0.5 comment text KSES overzealousness. 
    6661 
    6762== Upgrade Notice == 
     63= 0.8 = 
     64Upgrade if you are having JavaScript issues in the WordPress Dashboard. 
     65 
    6866= 0.7 = 
    6967Upgrade if you're getting JSON-related errors. 
    7068 
     
    8280 
    8381== Complete Hotfix List == 
    8482 
     83* **WordPress 3.3** 
     84        * Work around a bug for people without built-in JSON support 
     85 
    8586* **WordPress 3.2** 
    8687        * Include JSON support for people with funky PHP setups 
    8788