WordPress 3.4.2 版添加自定义栏目按钮失效临时解决方法

很多童鞋发现升级到WordPress  3.4.2 版后,添加自定义栏目按钮失效,这可能是WP所有版本中最明显的BUG,疯狂升级的结果….

虽然官方对此BUG未作出响应,不过非官方的修复方法已有人给出,你可以不必等待版本升级,先使用该插件临时解决该问题。

插件下载地址:http://wordpress.org/extend/plugins/hotfix/

上传空间插件目录并启用即可。

或者将下面代码添加到主题的functions模版中

  1. <?php   
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   
  9.   
  10.  fix_custom_fields_in_wp342() {   
  11.          ;   
  12.   
  13.          ( \’3.4.2\’ ==  && in_array( ( \’post.php\’, \’post-.php\’ ) ) ) : ?>   
  14. <script type=>   
  15. jQuery(document).delegate( \’#addmetasub, #updatemeta\’, \’hover focus\’, () {   
  16.         jQuery(this).attr(\’id\’, \’meta-add-submit\’);   
  17. });   
  18. </script>   
  19. <?php   
  20.         ;   
  21. }   
  22. add_action( \’admin_print_footer_scripts\’, \’fix_custom_fields_in_wp342\’ );   
  23. ?>  

来源:http://core.trac.wordpress.org/attachment/ticket/21829/fix-custom-fields-in-wp342.php

相信官方很快会修正该BUG。

    © 版权声明
    THE END
    喜欢就支持一下吧
    点赞0 分享
    评论 抢沙发

    请登录后发表评论

      暂无评论内容