1
我正在開發一個wordpress插件,我遇到了問題。WP插件管理員到白色屏幕
的問題正在引起這個代碼:
<?php
function gs_subscribe_button ($type) {
global $wpdb;
$id = get_option('google_merchant');
$table_name = $wpdb->prefix . "subscription_types";
$result = mysql_query ("SELECT * FROM $table_name WHERE id = $type");
echo '<form method="POST" action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/'.$id.'" accept-charset="utf-8">';
while ($row = mysql_fetch_array($result)) {
echo '<input type="hidden" name="shopping-cart.items.item-1.item-name" value="'.$row['name'].'"/>
<input type="hidden" name="shopping-cart.items.item-1.item-description" value="Your chossen Subscription"/>
<input type="hidden" name="shopping-cart.items.item-1.unit-price" value="'.$row['price'].'"/>
<input type="hidden" name="shopping-cart.items.item-1.unit-price.currency" value="GBP"/>
<input type="hidden" name="shopping-cart.items.item-1.quantity" value="1"/>';
}
echo '<input type="hidden" name="_charset_" />';
echo '<input type="image"
name="Google Checkout"
alt="Fast checkout through Google"
src="http://checkout.google.com/buttons/checkout.gif?merchant_id=';
echo $id;
echo '&w=180&h=46&style=white&variant=text&loc=en_US"
height="46"
width="180" />';
echo '</form>';
}
?>
東西在這導致所有管理員屏幕鎖定行動。有沒有辦法讓Wordpress只在前端應用功能?
不要忘記接受您的解決方案;) – antyrat 2010-07-29 10:01:27