【发布时间】:2010-05-31 14:28:52
【问题描述】:
我的一个主题有一个 wordpress 管理面板,其中一个框输入了一些代码来驱动 google adsense。当我将代码放入框中并使用我的 php 标签调用它时,代码如下所示:
<script type="\"text/javascript\""><!--
google_ad_client = \"pub-9295546347478163\";
/* Leaderboard 5/17/2010 */
google_ad_slot = \"7593465074\";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="\"text/javascript\"" src="%5C%22http://pagead2.googlesyndication.com/pagead/show_ads.js%5C%22">
</script>
我认为这是一个阻止 SQL 注入的功能。我怎样才能从一个盒子里调用纯代码?这就是我目前设置文本框的方式。
array( "name" => "Code for Top ad",
"desc" => "Enter the HTML that will drive the banner ad for the page header",
"id" => $shortname."_headerAd",
"type" => "textarea"),
然后用这个回显:
<?php echo get_option('lifestyle_headerAd'); ?>
【问题讨论】:
标签: php javascript wordpress wordpress-theming