function wp_cart_options()
{
    $wpspc_plugin_tabs = array('wordpress-paypal-shopping-cart' => 'General Settings', 'wordpress-paypal-shopping-cart&action=email-settings' => 'Email Settings', 'wordpress-paypal-shopping-cart&action=discount-settings' => 'Coupon/Discount');
    echo '<div class="wrap">' . screen_icon() . '<h2>' . __("WP Paypal Shopping Cart Options", "wordpress-simple-paypal-shopping-cart") . '</h2>';
    $current = "";
    if (isset($_GET['page'])) {
        $current = $_GET['page'];
        if (isset($_GET['action'])) {
            $current .= "&action=" . $_GET['action'];
        }
    }
    $content = '';
    $content .= '<h2 class="nav-tab-wrapper">';
    foreach ($wpspc_plugin_tabs as $location => $tabname) {
        if ($current == $location) {
            $class = ' nav-tab-active';
        } else {
            $class = '';
        }
        $content .= '<a class="nav-tab' . $class . '" href="?page=' . $location . '">' . $tabname . '</a>';
    }
    $content .= '</h2>';
    echo $content;
    echo '<div id="poststuff"><div id="post-body">';
    if (isset($_GET['action'])) {
        switch ($_GET['action']) {
            case 'email-settings':
                show_wp_cart_email_settings_page();
                break;
            case 'discount-settings':
                include_once 'wp_shopping_cart_discounts_menu.php';
                show_wp_cart_coupon_discount_settings_page();
                break;
        }
    } else {
        show_wp_cart_options_page();
    }
    echo '</div></div>';
    echo '</div>';
}
Exemplo n.º 2
0
function wp_cart_options()
{
    echo '<div class="wrap"><h2>' . __("WP Paypal Shopping Cart Options", "WSPSC") . '</h2>';
    echo '<div id="poststuff"><div id="post-body">';
    show_wp_cart_options_page();
    echo '</div></div>';
    echo '</div>';
}