最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

filters - how to unescape wordpress output

programmeradmin0浏览0评论

I am having to hook into a plugin and I need to actually output a value I get via jQuery. However, when I try to return it (I have to use return) it just escapes the javascript instead of actually giving me the value. So, the output on the screen is literally the text instead of the value ie: <script>document.write(buttontext);</script> instead of some value

<script>
var myValue = jQuery( '.my_value' ).val();
<?php 
     $myValue ="<script>document.write(myValue);</script>";             
 ?>
</script>
<?php
//.... some code.. $myValue ends up in $content which I return below
return $content;
?>
发布评论

评论列表(0)

  1. 暂无评论