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


PHP edd_item_quantities_enabled函数代码示例

本文整理汇总了PHP中edd_item_quantities_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP edd_item_quantities_enabled函数的具体用法?PHP edd_item_quantities_enabled怎么用?PHP edd_item_quantities_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: edd_wallet_item_incentive_amount

/**
 * Maybe add incentive discounts
 *
 * @since		1.0.1
 * @param		float $discount The current discount amount
 * @param		array $item The cart item array
 * @return		float $discount The updated discount amount
 */
function edd_wallet_item_incentive_amount($discount, $item)
{
    $incentive_amount = edd_get_option('edd_wallet_incentive_amount', 0);
    if ($incentive_amount <= 0) {
        return $discount;
    }
    if (!EDD()->session->get('wallet_has_incentives')) {
        return $discount;
    }
    if (edd_has_variable_prices($item['id'])) {
        $prices = edd_get_variable_prices($item['id']);
        $price_id = isset($item['options']['price_id']) ? $item['options']['price_id'] : 0;
        if ($price_id !== false && $price_id !== '' && isset($prices[$price_id])) {
            $price = edd_get_price_option_amount($item['id'], $price_id);
        } else {
            $price = edd_get_lowest_price_option($item['id']);
        }
    } else {
        $price = edd_get_download_price($item['id']);
    }
    $incentive_type = edd_get_option('edd_wallet_incentive_type', 'flatrate');
    if ($incentive_type == 'percent') {
        $incentive_amount /= 100;
        $incentive_amount = $price * $incentive_amount;
        if (edd_item_quantities_enabled() && edd_get_option('edd_wallet_incentive_quantities', false)) {
            $incentive_amount *= $item['quantity'];
        }
        $incentive_amount = number_format($incentive_amount, 2, '.', '');
    } else {
        if (edd_item_quantities_enabled() && edd_get_option('edd_wallet_incentive_quantities', false)) {
            $incentive_amount *= $item['quantity'];
        }
    }
    $discount += $incentive_amount;
    return $discount;
}
开发者ID:easydigitaldownloads,项目名称:edd-wallet,代码行数:44,代码来源:incentive-functions.php

示例2: foreach

		<?php 
    }
    ?>
		<?php 
    if ($fees = edd_get_payment_fees($payment->ID, 'item')) {
        ?>
			<?php 
        foreach ($fees as $fee) {
            ?>
				<tr>
					<td class="edd_fee_label"><?php 
            echo esc_html($fee['label']);
            ?>
</td>
					<?php 
            if (edd_item_quantities_enabled()) {
                ?>
						<td></td>
					<?php 
            }
            ?>
					<td class="edd_fee_amount"><?php 
            echo edd_currency_filter(edd_format_amount($fee['amount']));
            ?>
</td>
				</tr>
			<?php 
        }
        ?>
		<?php 
    }
开发者ID:Balamir,项目名称:Easy-Digital-Downloads,代码行数:31,代码来源:shortcode-receipt.php

示例3: edd_get_cart_item_quantity

/**
 * Get Cart Item Quantity
 *
 * @since 1.0
 * @param int $download_id Download (cart item) ID number
 * @param array $options Download options, such as price ID
 * @return int $quantity Cart item quantity
 */
function edd_get_cart_item_quantity($download_id = 0, $options = array())
{
    $cart = edd_get_cart_contents();
    $key = edd_get_item_position_in_cart($download_id, $options);
    $quantity = isset($cart[$key]['quantity']) && edd_item_quantities_enabled() ? $cart[$key]['quantity'] : 1;
    if ($quantity < 1) {
        $quantity = 1;
    }
    return apply_filters('edd_get_cart_item_quantity', $quantity, $download_id, $options);
}
开发者ID:ankitpokhrel,项目名称:Easy-Digital-Downloads,代码行数:18,代码来源:functions.php

示例4: edd_variable_price_quantity_field

/**
 * Display the quantity field for a variable price when multi-purchase mode is enabled
 *
 * @since 2.2
 * @param int $key Price ID
 * @param array $price price option array
 * @param int $download_id Download ID
 * @return void
 */
function edd_variable_price_quantity_field($key, $price, $download_id)
{
    if (!edd_item_quantities_enabled()) {
        return;
    }
    if (!edd_single_price_option_mode($download_id)) {
        return;
    }
    ob_start();
    ?>
	<div class="edd_download_quantity_wrapper edd_download_quantity_price_option_<?php 
    echo sanitize_key($price['name']);
    ?>
">
		<span class="edd_price_option_sep">&nbsp;x&nbsp;</span>
		<input type="number" min="1" step="1" name="edd_download_quantity_<?php 
    echo esc_attr($key);
    ?>
" class="edd-input edd-item-quantity" value="1" />
	</div>
<?php 
    $quantity_input = ob_get_clean();
    echo apply_filters('edd_purchase_form_variation_quantity_input', $quantity_input, $download_id, $key, $price);
}
开发者ID:jplhomer,项目名称:Easy-Digital-Downloads,代码行数:33,代码来源:template-functions.php

示例5: get_the_title

							$item_title = get_the_title( $item['id'] );
							if ( ! empty( $item['options'] ) && edd_has_variable_prices( $item['id'] ) ) {
								$item_title .= ' - ' . edd_get_cart_item_price_name( $item );
							}
							echo '<span class="edd_checkout_cart_item_title">' . esc_html( $item_title ) . '</span>';
							do_action( 'edd_checkout_cart_item_title_after', $item );
						?>
					</td>
					<td class="edd_cart_item_price">
						<?php 
						echo edd_cart_item_price( $item['id'], $item['options'] );
						do_action( 'edd_checkout_cart_item_price_after', $item );
						?>
					</td>
					<td class="edd_cart_actions">
						<?php if( edd_item_quantities_enabled() ) : ?>
							<input type="number" min="1" step="1" name="edd-cart-download-<?php echo $key; ?>-quantity" data-key="<?php echo $key; ?>" class="edd-input edd-item-quantity" value="<?php echo edd_get_cart_item_quantity( $item['id'], $item['options'] ); ?>"/>
							<input type="hidden" name="edd-cart-downloads[]" value="<?php echo $item['id']; ?>"/>
							<input type="hidden" name="edd-cart-download-<?php echo $key; ?>-options" value="<?php echo esc_attr( serialize( $item['options'] ) ); ?>"/>
						<?php endif; ?>
						<?php do_action( 'edd_cart_actions', $item, $key ); ?>
						<a class="edd_cart_remove_item_btn" href="<?php echo esc_url( edd_remove_item_url( $key ) ); ?>"><?php _e( 'Remove', 'edd' ); ?></a>
					</td>
					<?php do_action( 'edd_checkout_table_body_last', $item ); ?>
				</tr>
			<?php endforeach; ?>
		<?php endif; ?>
		<?php do_action( 'edd_cart_items_middle' ); ?>
		<!-- Show any cart fees, both positive and negative fees -->
		<?php if( edd_cart_has_fees() ) : ?>
			<?php foreach( edd_get_cart_fees() as $fee_id => $fee ) : ?>
开发者ID:harish94,项目名称:Easy-Digital-Downloads,代码行数:31,代码来源:checkout_cart.php

示例6: edd_load_admin_scripts

/**
 * Load Admin Scripts
 *
 * Enqueues the required admin scripts.
 *
 * @since 1.0
 * @global $post
 * @param string $hook Page hook
 * @return void
 */
function edd_load_admin_scripts($hook)
{
    if (!apply_filters('edd_load_admin_scripts', edd_is_admin_page(), $hook)) {
        return;
    }
    global $wp_version, $post;
    $js_dir = EDD_PLUGIN_URL . 'assets/js/';
    $css_dir = EDD_PLUGIN_URL . 'assets/css/';
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    // These have to be global
    wp_register_style('jquery-chosen', $css_dir . 'chosen' . $suffix . '.css', array(), EDD_VERSION);
    wp_enqueue_style('jquery-chosen');
    wp_register_script('jquery-chosen', $js_dir . 'chosen.jquery' . $suffix . '.js', array('jquery'), EDD_VERSION);
    wp_enqueue_script('jquery-chosen');
    wp_register_script('edd-admin-scripts', $js_dir . 'admin-scripts' . $suffix . '.js', array('jquery'), EDD_VERSION, false);
    wp_enqueue_script('edd-admin-scripts');
    wp_localize_script('edd-admin-scripts', 'edd_vars', array('post_id' => isset($post->ID) ? $post->ID : null, 'edd_version' => EDD_VERSION, 'add_new_download' => __('Add New Download', 'edd'), 'use_this_file' => __('Use This File', 'edd'), 'quick_edit_warning' => __('Sorry, not available for variable priced products.', 'edd'), 'delete_payment' => __('Are you sure you wish to delete this payment?', 'edd'), 'delete_payment_note' => __('Are you sure you wish to delete this note?', 'edd'), 'delete_tax_rate' => __('Are you sure you wish to delete this tax rate?', 'edd'), 'revoke_api_key' => __('Are you sure you wish to revoke this API key?', 'edd'), 'regenerate_api_key' => __('Are you sure you wish to regenerate this API key?', 'edd'), 'resend_receipt' => __('Are you sure you wish to resend the purchase receipt?', 'edd'), 'copy_download_link_text' => __('Copy these links to your clipboard and give them to your customer', 'edd'), 'delete_payment_download' => sprintf(__('Are you sure you wish to delete this %s?', 'edd'), edd_get_label_singular()), 'one_price_min' => __('You must have at least one price', 'edd'), 'one_field_min' => __('You must have at least one field', 'edd'), 'one_download_min' => __('Payments must contain at least one item', 'edd'), 'one_option' => sprintf(__('Choose a %s', 'edd'), edd_get_label_singular()), 'one_or_more_option' => sprintf(__('Choose one or more %s', 'edd'), edd_get_label_plural()), 'numeric_item_price' => __('Item price must be numeric', 'edd'), 'numeric_quantity' => __('Quantity must be numeric', 'edd'), 'currency' => edd_get_currency(), 'currency_sign' => edd_currency_filter(''), 'currency_pos' => edd_get_option('currency_position', 'before'), 'currency_decimals' => edd_currency_decimal_filter(), 'new_media_ui' => apply_filters('edd_use_35_media_ui', 1), 'remove_text' => __('Remove', 'edd'), 'type_to_search' => sprintf(__('Type to search %s', 'edd'), edd_get_label_plural()), 'quantities_enabled' => edd_item_quantities_enabled()));
    wp_enqueue_style('wp-color-picker');
    wp_enqueue_script('wp-color-picker');
    wp_register_style('colorbox', $css_dir . 'colorbox' . $suffix . '.css', array(), '1.3.20');
    wp_enqueue_style('colorbox');
    wp_register_script('colorbox', $js_dir . 'jquery.colorbox-min.js', array('jquery'), '1.3.20');
    wp_enqueue_script('colorbox');
    if (function_exists('wp_enqueue_media') && version_compare($wp_version, '3.5', '>=')) {
        //call for new media manager
        wp_enqueue_media();
    }
    wp_register_script('jquery-flot', $js_dir . 'jquery.flot' . $suffix . '.js');
    wp_enqueue_script('jquery-flot');
    wp_enqueue_script('jquery-ui-datepicker');
    wp_enqueue_script('jquery-ui-dialog');
    $ui_style = 'classic' == get_user_option('admin_color') ? 'classic' : 'fresh';
    wp_register_style('jquery-ui-css', $css_dir . 'jquery-ui-' . $ui_style . $suffix . '.css');
    wp_enqueue_style('jquery-ui-css');
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_enqueue_style('thickbox');
    wp_register_style('edd-admin', $css_dir . 'edd-admin' . $suffix . '.css', EDD_VERSION);
    wp_enqueue_style('edd-admin');
}
开发者ID:nguyenthai2010,项目名称:ngocshop,代码行数:51,代码来源:scripts.php

示例7: edd_pl_download_purchase_form_quantity_field

/**
 * Override the standard quantity field for non-variably priced products
 *
 * @since       1.2.10
 * @param       int $download_id The ID of this download
 * @param       array $args Array of arguments
 * @return      void
 */
function edd_pl_download_purchase_form_quantity_field($download_id = 0, $args = array())
{
    global $edd_prices_sold_out;
    if (!edd_item_quantities_enabled()) {
        return;
    }
    if (edd_item_in_cart($download_id) && !edd_has_variable_prices($download_id)) {
        return;
    }
    if (edd_single_price_option_mode($download_id) && edd_has_variable_prices($download_id) && !edd_item_in_cart($download_id)) {
        return;
    }
    if (edd_single_price_option_mode($download_id) && edd_has_variable_prices($download_id) && edd_item_in_cart($download_id)) {
        return;
    }
    if (!edd_single_price_option_mode($download_id) && edd_has_variable_prices($download_id) && edd_item_in_cart($download_id)) {
        return;
    }
    // Get options
    $scope = edd_get_option('edd_purchase_limit_scope') ? edd_get_option('edd_purchase_limit_scope') : 'site-wide';
    $max_purchases = edd_pl_get_file_purchase_limit($download_id);
    $disabled = '';
    if ($scope == 'site-wide') {
        $purchases = edd_get_download_sales_stats($download_id);
    } elseif (is_user_logged_in()) {
        $purchases = edd_pl_get_user_purchase_count(get_current_user_id(), $download_id);
    }
    if ($purchases) {
        if ($max_purchases && $purchases >= $max_purchases || !empty($edd_prices_sold_out)) {
            $disabled = 'disabled="disabled"';
        }
    }
    $max = 'max="" ';
    if ($max_purchases) {
        $remaining = $max_purchases - $purchases;
        $max = 'max="' . $remaining . '" ';
    }
    echo '<div class="edd_download_quantity_wrapper">';
    echo '<input type="number" min="1" ' . $max . 'step="1" ' . $disabled . 'name="edd_download_quantity" class="edd-input edd-item-quantity" value="1" />';
    echo '</div>';
}
开发者ID:brashrebel,项目名称:EDD-Purchase-Limit,代码行数:49,代码来源:functions.php

示例8: add_download

 /**
  * Add a download to a given payment
  *
  * @since 2.5
  * @param int  $download_id The download to add
  * @param int  $args Other arguments to pass to the function
  * @return void
  */
 public function add_download($download_id = 0, $args = array(), $options = array())
 {
     $download = new EDD_Download($download_id);
     // Bail if this post isn't a download
     if (!$download || $download->post_type !== 'download') {
         return false;
     }
     // Set some defaults
     $defaults = array('quantity' => 1, 'price_id' => false, 'item_price' => 0.0, 'discount' => 0, 'tax' => 0.0, 'fees' => array());
     $args = wp_parse_args(apply_filters('edd_payment_add_download_args', $args, $download->ID), $defaults);
     // Allow overriding the price
     if ($args['item_price']) {
         $item_price = $args['item_price'];
     } else {
         // Deal with variable pricing
         if (edd_has_variable_prices($download->ID)) {
             $prices = get_post_meta($download->ID, 'edd_variable_prices', true);
             if ($args['price_id'] && array_key_exists($args['price_id'], (array) $prices)) {
                 $item_price = $prices[$args['price_id']]['amount'];
             } else {
                 $item_price = edd_get_lowest_price_option($download->ID);
                 $args['price_id'] = edd_get_lowest_price_id($download->ID);
             }
         } else {
             $item_price = edd_get_download_price($download->ID);
         }
     }
     // Sanitizing the price here so we don't have a dozen calls later
     $item_price = edd_sanitize_amount($item_price);
     $quantity = edd_item_quantities_enabled() ? absint($args['quantity']) : 1;
     $amount = round($item_price * $quantity, edd_currency_decimal_filter());
     if (!empty($args['fees'])) {
         foreach ($args['fees'] as $key => $fee) {
             if (empty($fee['download_id'])) {
                 $args['fees'][$key]['download_id'] = $download_id;
             }
             $this->add_fee($args['fees'][$key], false);
         }
     }
     // Setup the downloads meta item
     $new_download = array('id' => $download->ID, 'quantity' => $quantity, 'fees' => $args['fees']);
     $default_options = array('quantity' => $quantity);
     if (!empty($args['price_id'])) {
         $default_options['price_id'] = (int) $args['price_id'];
     }
     $options = wp_parse_args($options, $default_options);
     $new_download['options'] = $options;
     $this->downloads[] = $new_download;
     $discount = $args['discount'];
     $subtotal = $amount;
     $tax = $args['tax'];
     if (edd_prices_include_tax()) {
         $subtotal -= round($tax, edd_currency_decimal_filter());
     }
     $total = $subtotal - $discount + $tax;
     // Do not allow totals to go negatve
     if ($total < 0) {
         $total = 0;
     }
     // Silly item_number array
     $item_number = array('id' => $download->ID, 'quantity' => $quantity, 'options' => $options);
     $this->cart_details[] = array('name' => $download->post_title, 'id' => $download->ID, 'item_number' => $item_number, 'item_price' => round($item_price, edd_currency_decimal_filter()), 'quantity' => $quantity, 'discount' => $discount, 'subtotal' => round($subtotal, edd_currency_decimal_filter()), 'tax' => round($tax, edd_currency_decimal_filter()), 'fees' => $args['fees'], 'price' => round($total, edd_currency_decimal_filter()));
     $added_download = end($this->cart_details);
     $added_download['action'] = 'add';
     $this->pending['downloads'][] = $added_download;
     reset($this->cart_details);
     $this->increase_subtotal($subtotal - $discount);
     $this->increase_tax($tax);
     return true;
 }
开发者ID:jplhomer,项目名称:Easy-Digital-Downloads,代码行数:78,代码来源:class-edd-payment.php

示例9: edd_email_tag_download_list_plain

/**
 * Email template tag: download_list
 * A list of download links for each download purchased in plaintext
 *
 * @since 2.1.1
 * @param int $payment_id
 *
 * @return string download_list
 */
function edd_email_tag_download_list_plain($payment_id)
{
    $payment_data = edd_get_payment_meta($payment_id);
    $cart_items = edd_get_payment_meta_cart_details($payment_id);
    $email = edd_get_payment_user_email($payment_id);
    $download_list = '';
    if ($cart_items) {
        $show_names = apply_filters('edd_email_show_names', true);
        $show_links = apply_filters('edd_email_show_links', true);
        foreach ($cart_items as $item) {
            if (edd_use_skus()) {
                $sku = edd_get_download_sku($item['id']);
            }
            if (edd_item_quantities_enabled()) {
                $quantity = $item['quantity'];
            }
            $price_id = edd_get_cart_item_price_id($item);
            if ($show_names) {
                $title = get_the_title($item['id']);
                if (!empty($quantity) && $quantity > 1) {
                    $title .= __('Quantity', 'easy-digital-downloads') . ': ' . $quantity;
                }
                if (!empty($sku)) {
                    $title .= __('SKU', 'easy-digital-downloads') . ': ' . $sku;
                }
                if ($price_id !== null) {
                    $title .= edd_get_price_option_name($item['id'], $price_id, $payment_id);
                }
                $download_list .= "\n";
                $download_list .= apply_filters('edd_email_receipt_download_title', $title, $item, $price_id, $payment_id) . "\n";
            }
            $files = edd_get_download_files($item['id'], $price_id);
            if (!empty($files)) {
                foreach ($files as $filekey => $file) {
                    if ($show_links) {
                        $download_list .= "\n";
                        $file_url = edd_get_download_file_url($payment_data['key'], $email, $filekey, $item['id'], $price_id);
                        $download_list .= edd_get_file_name($file) . ': ' . $file_url . "\n";
                    } else {
                        $download_list .= "\n";
                        $download_list .= edd_get_file_name($file) . "\n";
                    }
                }
            } elseif (edd_is_bundled_product($item['id'])) {
                $bundled_products = apply_filters('edd_email_tag_bundled_products', edd_get_bundled_products($item['id']), $item, $payment_id, 'download_list');
                foreach ($bundled_products as $bundle_item) {
                    $download_list .= '<div class="edd_bundled_product"><strong>' . get_the_title($bundle_item) . '</strong></div>';
                    $files = edd_get_download_files($bundle_item);
                    foreach ($files as $filekey => $file) {
                        if ($show_links) {
                            $file_url = edd_get_download_file_url($payment_data['key'], $email, $filekey, $bundle_item, $price_id);
                            $download_list .= $file['name'] . ': ' . $file_url . "\n";
                        } else {
                            $download_list .= $file['name'] . "\n";
                        }
                    }
                }
            }
            if ('' != edd_get_product_notes($item['id'])) {
                $download_list .= "\n";
                $download_list .= edd_get_product_notes($item['id']) . "\n";
            }
        }
    }
    return $download_list;
}
开发者ID:Balamir,项目名称:Easy-Digital-Downloads,代码行数:75,代码来源:class-edd-email-tags.php

示例10: edd_load_admin_scripts

/**
 * Load Admin Scripts
 *
 * Enqueues the required admin scripts.
 *
 * @since 1.0
 * @global $post
 * @param string $hook Page hook
 * @return void
 */
function edd_load_admin_scripts($hook)
{
    if (!apply_filters('edd_load_admin_scripts', edd_is_admin_page(), $hook)) {
        return;
    }
    global $post;
    $js_dir = EDD_PLUGIN_URL . 'assets/js/';
    $css_dir = EDD_PLUGIN_URL . 'assets/css/';
    // Use minified libraries if SCRIPT_DEBUG is turned off
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    // These have to be global
    wp_register_style('jquery-chosen', $css_dir . 'chosen' . $suffix . '.css', array(), EDD_VERSION);
    wp_enqueue_style('jquery-chosen');
    wp_register_script('jquery-chosen', $js_dir . 'chosen.jquery' . $suffix . '.js', array('jquery'), EDD_VERSION);
    wp_enqueue_script('jquery-chosen');
    wp_enqueue_script('jquery-form');
    $admin_deps = array();
    if (!edd_is_admin_page($hook, 'edit') && !edd_is_admin_page($hook, 'new')) {
        $admin_deps = array('jquery', 'jquery-form', 'inline-edit-post');
    } else {
        $admin_deps = array('jquery', 'jquery-form');
    }
    wp_register_script('edd-admin-scripts', $js_dir . 'admin-scripts' . $suffix . '.js', $admin_deps, EDD_VERSION, false);
    wp_enqueue_script('edd-admin-scripts');
    wp_localize_script('edd-admin-scripts', 'edd_vars', array('post_id' => isset($post->ID) ? $post->ID : null, 'edd_version' => EDD_VERSION, 'add_new_download' => __('Add New Download', 'easy-digital-downloads'), 'use_this_file' => __('Use This File', 'easy-digital-downloads'), 'quick_edit_warning' => __('Sorry, not available for variable priced products.', 'easy-digital-downloads'), 'delete_payment' => __('Are you sure you wish to delete this payment?', 'easy-digital-downloads'), 'delete_payment_note' => __('Are you sure you wish to delete this note?', 'easy-digital-downloads'), 'delete_tax_rate' => __('Are you sure you wish to delete this tax rate?', 'easy-digital-downloads'), 'revoke_api_key' => __('Are you sure you wish to revoke this API key?', 'easy-digital-downloads'), 'regenerate_api_key' => __('Are you sure you wish to regenerate this API key?', 'easy-digital-downloads'), 'resend_receipt' => __('Are you sure you wish to resend the purchase receipt?', 'easy-digital-downloads'), 'copy_download_link_text' => __('Copy these links to your clipboard and give them to your customer', 'easy-digital-downloads'), 'delete_payment_download' => sprintf(__('Are you sure you wish to delete this %s?', 'easy-digital-downloads'), edd_get_label_singular()), 'one_price_min' => __('You must have at least one price', 'easy-digital-downloads'), 'one_field_min' => __('You must have at least one field', 'easy-digital-downloads'), 'one_download_min' => __('Payments must contain at least one item', 'easy-digital-downloads'), 'one_option' => sprintf(__('Choose a %s', 'easy-digital-downloads'), edd_get_label_singular()), 'one_or_more_option' => sprintf(__('Choose one or more %s', 'easy-digital-downloads'), edd_get_label_plural()), 'numeric_item_price' => __('Item price must be numeric', 'easy-digital-downloads'), 'numeric_quantity' => __('Quantity must be numeric', 'easy-digital-downloads'), 'currency' => edd_get_currency(), 'currency_sign' => edd_currency_filter(''), 'currency_pos' => edd_get_option('currency_position', 'before'), 'currency_decimals' => edd_currency_decimal_filter(), 'new_media_ui' => apply_filters('edd_use_35_media_ui', 1), 'remove_text' => __('Remove', 'easy-digital-downloads'), 'type_to_search' => sprintf(__('Type to search %s', 'easy-digital-downloads'), edd_get_label_plural()), 'quantities_enabled' => edd_item_quantities_enabled(), 'batch_export_no_class' => __('You must choose a method.', 'easy-digital-downloads'), 'batch_export_no_reqs' => __('Required fields not completed.', 'easy-digital-downloads'), 'reset_stats_warn' => __('Are you sure you want to reset your store? This process is <strong><em>not reversible</em></strong>. Please be sure you have a recent backup.', 'easy-digital-downloads'), 'search_placeholder' => sprintf(__('Type to search all %s', 'easy-digital-downloads'), edd_get_label_plural()), 'search_placeholder_customer' => __('Type to search all Customers', 'easy-digital-downloads'), 'search_placeholder_country' => __('Type to search all Countries', 'easy-digital-downloads'), 'search_placeholder_state' => __('Type to search all States/Provinces', 'easy-digital-downloads'), 'unsupported_browser' => __('We are sorry but your browser is not compatible with this kind of file upload. Please upgrade your browser.', 'easy-digital-downloads')));
    wp_enqueue_style('wp-color-picker');
    wp_enqueue_script('wp-color-picker');
    wp_register_style('colorbox', $css_dir . 'colorbox' . $suffix . '.css', array(), '1.3.20');
    wp_enqueue_style('colorbox');
    wp_register_script('colorbox', $js_dir . 'jquery.colorbox-min.js', array('jquery'), '1.3.20');
    wp_enqueue_script('colorbox');
    //call for media manager
    wp_enqueue_media();
    wp_register_script('jquery-flot', $js_dir . 'jquery.flot' . $suffix . '.js');
    wp_enqueue_script('jquery-flot');
    wp_enqueue_script('jquery-ui-datepicker');
    wp_enqueue_script('jquery-ui-dialog');
    wp_enqueue_script('jquery-ui-tooltip');
    $ui_style = 'classic' == get_user_option('admin_color') ? 'classic' : 'fresh';
    wp_register_style('jquery-ui-css', $css_dir . 'jquery-ui-' . $ui_style . $suffix . '.css');
    wp_enqueue_style('jquery-ui-css');
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_enqueue_style('thickbox');
    wp_register_style('edd-admin', $css_dir . 'edd-admin' . $suffix . '.css', EDD_VERSION);
    wp_enqueue_style('edd-admin');
}
开发者ID:pderksen,项目名称:Easy-Digital-Downloads,代码行数:57,代码来源:scripts.php

示例11: edd_update_cart_button

/**
 * Display the "Save Cart" button on the checkout
 *
 * @since 1.8
 * @return void
 */
function edd_update_cart_button()
{
    if (!edd_item_quantities_enabled()) {
        return;
    }
    $color = edd_get_option('checkout_color', 'blue');
    $color = $color == 'inherit' ? '' : $color;
    ?>
	<input type="submit" name="edd_update_cart_submit" class="edd-submit edd-no-js button<?php 
    echo ' ' . $color;
    ?>
" value="<?php 
    _e('Update Cart', 'easy-digital-downloads');
    ?>
"/>
	<input type="hidden" name="edd_action" value="update_cart"/>
<?php 
}
开发者ID:Balamir,项目名称:Easy-Digital-Downloads,代码行数:24,代码来源:template.php

示例12: payment_creation_form


//.........这里部分代码省略.........
        echo edd_get_label_plural();
        ?>
</label>
							</th>
							<td class="edd-mp-downloads">
								<div id="edd_file_fields" class="edd_meta_table_wrap">
									<table class="widefat edd_repeatable_table" style="width: auto;" cellpadding="0" cellspacing="0">
										<thead>
											<tr>
												<th style="padding: 10px;"><?php 
        echo edd_get_label_plural();
        ?>
</th>
												<th style="padding: 10px;"><?php 
        _e('Price Option', 'edd-manual-purchases');
        ?>
</th>
												<th style="padding: 10px; width: 150px;"><?php 
        _e('Amount', 'edd-manual-purchases');
        ?>
</th>
												<?php 
        if (edd_use_taxes()) {
            ?>
													<th style="padding: 10px; width: 150px;"><?php 
            _e('Tax', 'edd-manual-purchases');
            ?>
</th>
													<?php 
            $columns++;
            ?>
												<?php 
        }
        if (edd_item_quantities_enabled()) {
            ?>
													<th style="padding: 10px; width: 50px;"><?php 
            _e('Quantity', 'edd-manual-purchases');
            ?>
</th>
													<?php 
            $columns++;
            ?>
												<?php 
        }
        ?>
												<th style="padding: 10px; width: 5px;"
											</tr>
										</thead>
										<tbody>
											<tr class="edd_repeatable_product_wrapper edd_repeatable_row" data-key="1">
												<td>
													<?php 
        echo EDD()->html->product_dropdown(array('name' => 'downloads[1][id]', 'id' => 'downloads', 'class' => 'mp-downloads', 'multiple' => false, 'chosen' => true));
        ?>
												</td>
												<td class="download-price-option-wrap"><?php 
        _e('N/A', 'edd-manual-purchases');
        ?>
</td>
												<td>
													<input type="number" step="<?php 
        echo $step;
        ?>
" class="edd-mp-amount" name="downloads[1][amount]" value="" min="0" placeholder="<?php 
        esc_attr_e('Item price', 'edd-manual-purchases');
        ?>
开发者ID:easydigitaldownloads,项目名称:edd-manual-purchases,代码行数:67,代码来源:edd-manual-purchases.php

示例13: edd_update_cart_button

/**
 * Display the "Save Cart" button on the checkout
 *
 * @since 1.8
 * @global $edd_options Array of all the EDD Options
 * @return void
 */
function edd_update_cart_button()
{
    global $edd_options;
    if (!edd_item_quantities_enabled()) {
        return;
    }
    $color = isset($edd_options['checkout_color']) ? $edd_options['checkout_color'] : 'blue';
    $color = $color == 'inherit' ? '' : $color;
    ?>
	<input type="submit" name="edd_update_cart_submit" class="edd-submit edd-no-js button<?php 
    echo ' ' . $color;
    ?>
" value="<?php 
    _e('Update Cart', 'edd');
    ?>
"/>
	<input type="hidden" name="edd_action" value="update_cart"/>
<?php 
}
开发者ID:Bragi26,项目名称:Easy-Digital-Downloads,代码行数:26,代码来源:template.php


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