我需要一种方法来更改我的注释表单的编码类型,而不必修改核心文件。
我知道编辑后表单的功能:post_edit_form_tag
.
我试过这个:
jQuery(\'#comment_form\').attr("enctype","multipart/form-data");
但它不起作用,我所知道的下一步就是破解源代码。。。任何帮助都将不胜感激,提前谢谢!我需要一种方法来更改我的注释表单的编码类型,而不必修改核心文件。
我知道编辑后表单的功能:post_edit_form_tag
.
我试过这个:
jQuery(\'#comment_form\').attr("enctype","multipart/form-data");
但它不起作用,我所知道的下一步就是破解源代码。。。任何帮助都将不胜感激,提前谢谢!一匹小马驹回答了这个问题,下面是他的解决方案:
jQuery(\'#comment_form\')[0].encoding = \'multipart/form-data\';
以及here\'s a jsFiddle 是的。我正在使用paginate\\u comments\\u links()获取当前用户的所有注释:<?php global $current_user; get_currentuserinfo(); $userid = $current_user->ID; $args = array( \'user_id\' => $userid, \'number\' => 2, ); $comments =