admin管理员组文章数量:1430185
I'm using the wp.template()
to create a BackBone JS template which comes with WordPress by default.
I have a template defined as:
<script type="text/html" id="tmpl-pre-registration">
<div className="stvp-preregistration">
<form className="stvp-preregistration__form" id="stvp-preregistration__form">
<label htmlFor="stvp-preregistration__email-input">{{ data.name }}</label>
<input placeholder='Email' type="email" name="stvp-preregistration-email-input" id="stvp-preregistration-email-input"/>
<input id="stvp-preregistration__email-submit" type="submit" disabled />
</form>
<p className="stvp-preregistration__message">Some Message</p>
</div>
</script>
I am trying to set certain values in the template which I receive from Ajax response.
But my Ajax response includes the above script with it.
As you see, I just want the response to be:
{"success":false,"exit":false}
Can anyone explain why this happens?
本文标签: plugin developmentwptemplate() returns ltscriptgt tags in Ajax response
版权声明:本文标题:plugin development - wp.template() returns <script> tags in Ajax response 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745516471a2661569.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论