Wordpress:使用wp\U insert\U post时,post\U内容出现问题

Wordpress:使用wp\U insert\U post时,post\U内容出现问题,wordpress,Wordpress,我有一个非常奇怪的问题,我非常感谢你的帮助 当用户提交帖子时,我正在使用wp_insert_post。当我提交表单(即wordpress站点的管理员)时,它可以正常工作,但当我与不同的用户尝试相同的操作(即不同的电子邮件,而不是wordpress站点的管理员)时,它只显示我在post_内容字段中使用的部分内容 我的代码: $my_post = array( 'post_title' => 'My bet', 'post_content' => '<form action

我有一个非常奇怪的问题,我非常感谢你的帮助

当用户提交帖子时,我正在使用wp_insert_post。当我提交表单(即wordpress站点的管理员)时,它可以正常工作,但当我与不同的用户尝试相同的操作(即不同的电子邮件,而不是wordpress站点的管理员)时,它只显示我在post_内容字段中使用的部分内容

我的代码:

$my_post = array(
'post_title'    => 'My bet',
'post_content'  => '<form action="" method="post" id=form_id>' . 'bet ID: ' . '<input readonly id=betid     type=text value=' . $bet_id . '>' . '<input id=url name=urlpath type=hidden value=>' . '</form>' ."\r\n match: " . '<span id=match>' . $_POST[event] . '</span>' . "\r\n" . $current_user->user_login . "'s Pick: " . $_POST[bet] . '</span>' . '<span id=friends>' . '</span>' ."\r\n Amount: " . '<span id=amount>' . $_POST[amount] . '</span>' . "<?php include('wp-content/themes/twentyfourteen/test.php') ?>"
'post_status'   => 'publish');
$my_post=数组(
“post_title”=>“我的赌注”,
'发布内容'=>''。'赌注ID:'.''.\r\n匹配:'.$'发布[事件]。'\r\n.$当前用户->用户登录。'.$'的选择:'.$'发布[赌注]。'\r\n金额:'.$'发布[金额]。'
“发布状态”=>“发布”);

当为wordpress管理员用户(用户ID=1)执行时,它工作正常。当为任何其他用户(用户ID!=1)执行时,它不会显示表单的输入字段,更重要的是,不包括我包含的test.php。

糟糕的代码。。。真正地当你有一个巨大的单线障碍时,你应该如何工作/理解/帮助?你能把它编辑成可读的代码吗?检查权限。将一些用户设为编辑器并选中。很抱歉,它显示为一行,因为它只是将元素添加到帖子中。Pranita-权限会有什么问题?这篇文章是为每个人创建的,只是没有包含我插入的所有元素。