Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Fix Custom Fields in WP 3.4.2
- Version: 0.1
- Plugin URI: http://core.trac.wordpress.org/ticket/21829
- Description: Implements a workaround for adding and updating custom fields in WordPress 3.4.2.
- Author: Sergey Biryukov
- Author URI: http://profiles.wordpress.org/sergeybiryukov/
- */
- function fix_custom_fields_in_wp342() {
- global $wp_version, $hook_suffix;
- if ( '3.4.2' == $wp_version && in_array( $hook_suffix, array( 'post.php', 'post-new.php' ) ) ) : ?>
- <script type="text/javascript">
- jQuery(document).delegate( '#addmetasub, #updatemeta', 'hover focus', function() {
- jQuery(this).attr('id', 'meta-add-submit');
- });
- </script>
- <?php
- endif;
- }
- add_action( 'admin_print_footer_scripts', 'fix_custom_fields_in_wp342' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement