我已经审查了几个关于此的在线文档,并审查了该网站上的帖子,但似乎仍然无法让我的管理员帖子请求工作。在我的管理菜单构造函数中,我添加了以下操作:
add_action('admin_post_modify_release_request','handle_release_posting');
使用以下函数处理程序:
function handle_release_posting(){
print_r($_POST);
echo "<br/>incoming:" . var_export($_POST, TRUE) . "<br/>";
?> <div class="wrap">
<?php screen_icon(); ?>
<div class="release_response">Posting response goes here.</div>
</div>
<?php
}
我的html表单元素是这样的:“method =”post“>
与其他投入加...
<input type="hidden" id='action' name="action" value="modify_release_request">
<input type="submit" value="Modify Release"></div>
</form>
提交请求的行为是调用http://joomla.tenasys.lan/wp-admin/admin-post.php
一个完全空的页面:
<html><head></head><body></body></html>
我错过了什么?我究竟做错了什么?