2010-05-31 173 views
0

我有一个wordpress管理面板为我的主题之一,其中一个框有一些代码驱动谷歌adsense输入。当我把代码放到包装箱,并用我的PHP代码会调用它的代码出来是这样的:WordPress的管理面板代码输入

 <script type="\&quot;text/javascript\&quot;"><!-- 
google_ad_client = \"pub-9295546347478163\"; 
/* Leaderboard 5/17/2010 */ 
google_ad_slot = \"7593465074\"; 
google_ad_width = 728; 
google_ad_height = 90; 
//--> 
</script> 
<script type="\&quot;text/javascript\&quot;" 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'); ?> 

回答

0

是否当您从POST保存数据,你stripslashing? WordPress会自动添加魔术引号到GET和POST,您需要在保存前进行清理。

相关问题