当前位置: 首页>>代码示例>>PHP>>正文


PHP SwpmUtils::membership_level_dropdown方法代码示例

本文整理汇总了PHP中SwpmUtils::membership_level_dropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP SwpmUtils::membership_level_dropdown方法的具体用法?PHP SwpmUtils::membership_level_dropdown怎么用?PHP SwpmUtils::membership_level_dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SwpmUtils的用法示例。


在下文中一共展示了SwpmUtils::membership_level_dropdown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    </p>
</div>

<form id="category_list_form" method="post">    
    <p class="swpm-select-box-left">
        <label for="membership_level_id"><?php 
SwpmUtils::e('Membership Level:');
?>
</label>
        <select id="membership_level_id" name="membership_level_id">
            <option <?php 
echo $category_list->selected_level_id == 1 ? "selected" : "";
?>
 value="1">General Protection</option>
            <?php 
echo SwpmUtils::membership_level_dropdown($category_list->selected_level_id);
?>
        </select>                
    </p>
    <p class="swpm-select-box-left"><input type="submit" class="button-primary" name="update_category_list" value="<?php 
SwpmUtils::e('Update');
?>
"></p>
        <?php 
$category_list->prepare_items();
?>
   
        <?php 
$category_list->display();
?>
</form>
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:31,代码来源:admin_category_list.php

示例2: swpm_edit_pp_subscription_button

function swpm_edit_pp_subscription_button()
{
    //Retrieve the payment button data and present it for editing.
    $button_id = sanitize_text_field($_REQUEST['button_id']);
    $button_id = absint($button_id);
    $button_type = sanitize_text_field($_REQUEST['button_type']);
    $button = get_post($button_id);
    //Retrieve the CPT for this button
    $membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
    //$payment_amount = get_post_meta($button_id, 'payment_amount', true);
    $payment_currency = get_post_meta($button_id, 'payment_currency', true);
    $return_url = get_post_meta($button_id, 'return_url', true);
    $paypal_email = get_post_meta($button_id, 'paypal_email', true);
    $button_image_url = get_post_meta($button_id, 'button_image_url', true);
    //Subscription billing details
    $billing_amount = get_post_meta($button_id, 'billing_amount', true);
    $billing_cycle = get_post_meta($button_id, 'billing_cycle', true);
    $billing_cycle_term = get_post_meta($button_id, 'billing_cycle_term', true);
    $billing_cycle_count = get_post_meta($button_id, 'billing_cycle_count', true);
    $billing_reattempt = get_post_meta($button_id, 'billing_reattempt', true);
    //Trial billing details
    $trial_billing_amount = get_post_meta($button_id, 'trial_billing_amount', true);
    $trial_billing_cycle = get_post_meta($button_id, 'trial_billing_cycle', true);
    $trial_billing_cycle_term = get_post_meta($button_id, 'trial_billing_cycle_term', true);
    ?>
    <form id="pp_button_config_form" method="post">

        <div class="postbox">
            <h3 class="hndle"><label for="title"><?php 
    echo SwpmUtils::_('PayPal Subscription Button Configuration');
    ?>
</label></h3>
            <div class="inside">

                <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Button ID');
    ?>
</th>
                        <td>
                            <input type="text" size="10" name="button_id" value="<?php 
    echo $button_id;
    ?>
" readonly required />
                            <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Button Title');
    ?>
</th>
                        <td>
                            <input type="text" size="50" name="button_name" value="<?php 
    echo $button->post_title;
    ?>
" required />
                            <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Membership Level');
    ?>
</th>
                        <td>
                            <select id="membership_level_id" name="membership_level_id">
                                <?php 
    echo SwpmUtils::membership_level_dropdown($membership_level_id);
    ?>
                            </select>
                            <p class="description">Select the membership level this payment button is for.</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Payment Currency');
    ?>
</th>
                        <td>                            
                            <select id="payment_currency" name="payment_currency">
                                <option value="USD" <?php 
    echo $payment_currency == 'USD' ? 'selected="selected"' : '';
    ?>
>US Dollars ($)</option>
                                <option value="EUR" <?php 
    echo $payment_currency == 'EUR' ? 'selected="selected"' : '';
    ?>
>Euros (€)</option>
                                <option value="GBP" <?php 
    echo $payment_currency == 'GBP' ? 'selected="selected"' : '';
    ?>
>Pounds Sterling (£)</option>
                                <option value="AUD" <?php 
    echo $payment_currency == 'AUD' ? 'selected="selected"' : '';
//.........这里部分代码省略.........
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:101,代码来源:admin_paypal_subscription_button.php

示例3: swpm_edit_pp_buy_now_button

function swpm_edit_pp_buy_now_button()
{
    //Retrieve the payment button data and present it for editing.
    $button_id = sanitize_text_field($_REQUEST['button_id']);
    $button_id = absint($button_id);
    $button_type = sanitize_text_field($_REQUEST['button_type']);
    $button = get_post($button_id);
    //Retrieve the CPT for this button
    $membership_level_id = get_post_meta($button_id, 'membership_level_id', true);
    $payment_amount = get_post_meta($button_id, 'payment_amount', true);
    $payment_currency = get_post_meta($button_id, 'payment_currency', true);
    $return_url = get_post_meta($button_id, 'return_url', true);
    $paypal_email = get_post_meta($button_id, 'paypal_email', true);
    $button_image_url = get_post_meta($button_id, 'button_image_url', true);
    ?>
    <div class="postbox">
        <h3 class="hndle"><label for="title"><?php 
    echo SwpmUtils::_('PayPal Buy Now Button Configuration');
    ?>
</label></h3>
        <div class="inside">

            <form id="pp_button_config_form" method="post">
                <input type="hidden" name="button_type" value="<?php 
    echo $button_type;
    ?>
">

                <table class="form-table" width="100%" border="0" cellspacing="0" cellpadding="6">

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Button ID');
    ?>
</th>
                        <td>
                            <input type="text" size="10" name="button_id" value="<?php 
    echo $button_id;
    ?>
" readonly required />
                            <p class="description">This is the ID of this payment button. It is automatically generated for you and it cannot be changed.</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Button Title');
    ?>
</th>
                        <td>
                            <input type="text" size="50" name="button_name" value="<?php 
    echo $button->post_title;
    ?>
" required />
                            <p class="description">Give this membership payment button a name. Example: Gold membership payment</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Membership Level');
    ?>
</th>
                        <td>
                            <select id="membership_level_id" name="membership_level_id">
                                <?php 
    echo SwpmUtils::membership_level_dropdown($membership_level_id);
    ?>
                            </select>
                            <p class="description">Select the membership level this payment button is for.</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Payment Amount');
    ?>
</th>
                        <td>
                            <input type="text" size="6" name="payment_amount" value="<?php 
    echo $payment_amount;
    ?>
" required />
                            <p class="description">Enter payment amount. Example values: 10.00 or 19.50 or 299.95 etc (do not put currency symbol).</p>
                        </td>
                    </tr>

                    <tr valign="top">
                        <th scope="row"><?php 
    echo SwpmUtils::_('Payment Currency');
    ?>
</th>
                        <td>                            
                            <select id="payment_currency" name="payment_currency">
                                <option value="USD" <?php 
    echo $payment_currency == 'USD' ? 'selected="selected"' : '';
    ?>
>US Dollars ($)</option>
                                <option value="EUR" <?php 
    echo $payment_currency == 'EUR' ? 'selected="selected"' : '';
//.........这里部分代码省略.........
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:101,代码来源:admin_paypal_buy_now_button.php


注:本文中的SwpmUtils::membership_level_dropdown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。