Temporary solution for adding a Custom column button to WordPress 3.4.2 becomes invalid

Source: Internet
Author: User

Many children's shoes found that after they upgraded to WordPress 3.4.2, the buttons for adding custom columns failed. This may be the most obvious BUG in all versions of WP. The results of crazy upgrades ....
 
Although the official team has not responded to this BUG, some unofficial fixes have been provided. You do not have to wait for the version upgrade. Use this plug-in to temporarily solve the problem.
 
Plug-in: http://wordpress.org/extend/plugins/hotfix/
 
Upload the space plug-in directory and enable it.
 
Or Add the following code to the topic's functions template.
 
<? 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 focal ', function (){
JQuery (this). attr ('id', 'meta-add-submit ');
});
</Script>
<? Php
Endif;
}
Add_action ('admin _ print_footer_scripts ', 'fix _ custom_fields_in_wp342 ');
?>
Source: http://core.trac.wordpress.org/attachment/ticket/21829/fix-custom-fields-in-wp342.php
 
I believe the official website will soon fix this BUG.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.