WordPress.org

Plugin Directory

Changeset 595967 for hotfix


Ignore:
Timestamp:
09/07/12 14:49:54 (20 months ago)
Author:
nacin
Message:

Hotfix: Fix Custom Fields add and update. see http://core.trac.wordpress.org/ticket/21829. props SergeyBiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hotfix/trunk/hotfix.php

    r476097 r595967  
    3535 
    3636    switch ( $wp_version ) { 
     37        case '3.4.2' : 
     38            $hotfixes = array( '342_custom_fields' ); 
     39            break; 
    3740        case '3.3' : 
    3841            $hotfixes = array( '330_no_wp_print_styles_in_admin', '330_no_json_encode_load_scripts' ); 
     
    133136        define( 'CONCATENATE_SCRIPTS', false ); 
    134137} 
     138 
     139function wp_hotfix_342_custom_fields() { 
     140    add_action( 'admin_footer-post.php',     'wp_hotfix_342_custom_fields_action' ); 
     141    add_action( 'admin_footer-post-new.php', 'wp_hotfix_342_custom_fields_action' ); 
     142} 
     143 
     144function wp_hotfix_342_custom_fields_action() { 
     145    ?><script> 
     146    jQuery(document).ready( function($) { 
     147        $('#postcustomstuff').on('hover focus', '#addmetasub, #updatemeta', function() { 
     148            $(this).attr('id', 'meta-add-submit'); 
     149        }); 
     150    }); 
     151    </script> 
     152    <?php 
     153} 
Note: See TracChangeset for help on using the changeset viewer.