WordPress
WordPress
很多童鞋发现升级到WordPress 3.4.2 版后,添加自定义栏目按钮失效,这可能是WP所有版本中最明显的BUG,疯狂升级的结果….
虽然官方对此BUG未作出响应,不过非官方的修复方法已有人给出,你可以不必等待版本升级,先使用该插件临时解决该问题。
插件下载地址:http://wordpress.org/extend/plugins/hotfix/
上传空间插件目录并启用即可。
或者将下面代码添加到主题的functions模版中
- <?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’ );
- ?>
来源:http://core.trac.wordpress.org/attachment/ticket/21829/fix-custom-fields-in-wp342.php
相信官方很快会修正该BUG。

下载说明:
1. 本站所有资源来源于网络和用户上传,如有侵权请联系站长
2. 本站分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,商用请支持正版!不得违反国家法律,否则后果自负!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
本站的资源均来自于互联网,仅为资源共享、学习参考之目的,其版权均归原作者及其网站所有,如有侵权请留言联系:admin,转转请注明出处:http://zhanmr.com/3786.htm