网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 WP3.4.2添加自定义栏目按钮失效的解决方法
范文
    很多童鞋发现升级到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' );
    ?>
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/22 3:25:32