2010-05-31 179 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,您需要在保存前進行清理。

相關問題