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


PHP woocommerce_wp_textarea_input函数代码示例

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


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

示例1: woo_refercheck_add_custom_general_fields

/**
 * Display the custom WCRC fields on every product edit page
 */
function woo_refercheck_add_custom_general_fields()
{
    global $woocommerce, $post;
    // read the current referrers list
    $referrers = get_post_meta($post->ID, '_woo_refercheck_referrers', true);
    // convert to array
    $ref_array = json_decode($referrers);
    // build the value of the textarea
    $theval = '';
    if (count($ref_array) > 0) {
        $i = 0;
        foreach ($ref_array as $item) {
            $theval .= $item;
            if ($i != count($ref_array) - 1) {
                $theval .= PHP_EOL;
            }
            $i++;
        }
    }
    // start the HTML output for the custom fields
    echo '<div class="options_group">';
    // create and output the checkbox
    woocommerce_wp_checkbox(array('id' => '_woo_refercheck_checkbox', 'label' => __('Limit to referrer(s)', 'woo-refercheck'), 'description' => __('Select if the display of this product should be limited to the specified referrer(s).', 'woo-refercheck')));
    // create and output the text field
    woocommerce_wp_textarea_input(array('id' => '_woo_refercheck_referrers', 'label' => __('Allowed referrer(s)', 'woo-refercheck'), 'placeholder' => '', 'desc_tip' => 'true', 'description' => __('Add the full HTTP addresseses of allowed referrer(s) for this product, one per line.', 'woo-refercheck'), 'value' => $theval));
    woocommerce_wp_text_input(array('id' => '_woo_refercheck_target', 'label' => __('Redirect to', 'woo-refercheck'), 'placeholder' => 'http://', 'desc_tip' => 'true', 'description' => __('Enter the absolute URL to redirect to when this product is accessed form an unallowed referer.', 'woo-refercheck')));
    // complete the HTML output
    echo '</div>';
}
开发者ID:kathmann,项目名称:woo_refercheck,代码行数:32,代码来源:functions.php

示例2: rf_meta_box

/**
 * Creates the Referfriend Meta Box in the admin control panel when in the Giftcard Post Type.  Allows you to create a giftcard manually.
 * @param  [type] $post
 * @return [type]
 */
function rf_meta_box($post)
{
    global $woocommerce;
    wp_nonce_field('woocommerce_save_data', 'woocommerce_meta_nonce');
    ?>
	<style type="text/css">
		#edit-slug-box, #minor-publishing-actions { display:none }

		.form-field input, .form-field textarea { width:100%;}

		input[type="checkbox"], input[type="radio"] { float: left; width:16px;}
	</style>

	<div class="panel woocommerce_options_panel">
	<?php 
    woocommerce_wp_select(array('id' => 'rf_coupon_type', 'label' => __('Coupon Type', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Coupon Type', 'mg_referfriend'), 'options' => wc_get_coupon_types()));
    woocommerce_wp_text_input(array('id' => 'rf_coupon_amount', 'label' => __('Coupon Amount', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Coupon Amount', 'mg_referfriend'), 'type' => 'number', 'custom_attributes' => array('step' => 'any', 'min' => '0')));
    woocommerce_wp_select(array('id' => 'rf_type', 'label' => __('Type', 'mg_referfriend'), 'placeholder' => '', 'options' => array('' => '', '1' => 'Refered by Email', '2' => 'Refered by share link')));
    // Description
    woocommerce_wp_textarea_input(array('id' => 'rf_description', 'label' => __('Description', 'rpgiftcards'), 'placeholder' => '', 'description' => __('Description', 'rpgiftcards')));
    woocommerce_wp_text_input(array('id' => 'rf_product_id', 'label' => __('Product IDs', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Product IDs', 'mg_referfriend'), 'type' => 'number'));
    woocommerce_wp_text_input(array('id' => 'rf_usage', 'label' => __('Usage', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Usage', 'mg_referfriend')));
    woocommerce_wp_text_input(array('id' => 'rf_limit', 'label' => __('Limit', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Limit', 'mg_referfriend')));
    woocommerce_wp_text_input(array('id' => 'rf_expiry_date', 'label' => __('Expiry Date', 'mg_referfriend'), 'placeholder' => '', 'description' => __('Expiry Date', 'mg_referfriend')));
    echo '</div>';
}
开发者ID:javolero,项目名称:dabba,代码行数:31,代码来源:referfriend-metabox.php

示例3: woo_add_custom_general_fields

function woo_add_custom_general_fields()
{
    global $woocommerce, $post;
    echo '<div id="thong_tin_hoa_chat" class="panel woocommerce_options_panel"><div class="options_group">';
    woocommerce_wp_text_input(array('id' => '_ten_hoa_hoc_field', 'label' => __('Tển hoá học', 'woocommerce'), 'placeholder' => 'Calcium Hypochlorite', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    woocommerce_wp_textarea_input(array('id' => '_ten_goi_khac_field', 'label' => __('Các tên gọi khác', 'woocommerce'), 'placeholder' => 'Tên gọi 1, Tên gọi 2, Tên gọi 3', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    woocommerce_wp_text_input(array('id' => '_cong_thuc_hoa_hoc_field', 'label' => __('Công thức hoá học', 'woocommerce'), 'placeholder' => 'Ca(OCl)2', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    woocommerce_wp_text_input(array('id' => '_ham_luong_hoa_chat_field', 'label' => __('Hàm lượng hoá chất', 'woocommerce'), 'placeholder' => '%', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    woocommerce_wp_text_input(array('id' => '_xuat_xu_field', 'label' => __('Xuất xứ', 'woocommerce'), 'placeholder' => '', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    woocommerce_wp_text_input(array('id' => '_dong_goi_field', 'label' => __('Đóng gói', 'woocommerce'), 'placeholder' => 'Kg/1thùng', 'desc_tip' => 'true', 'description' => __('Enter the custom value here.', 'woocommerce')));
    echo '</div></div>';
}
开发者ID:bachhuong,项目名称:dains-development,代码行数:12,代码来源:functions_custom.php

示例4: woocommerce_coupon_options

 /**
  * Renders coupon options.
  */
 public static function woocommerce_coupon_options()
 {
     global $post, $woocommerce;
     //
     // Volume discounts based on cart items
     //
     echo '<div class="options_group">';
     echo '<p>';
     echo '<strong>';
     echo __('Volume Discount', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</strong>';
     echo '</p>';
     $product_ids = !empty($post) && !empty($post->ID) ? get_post_meta($post->ID, '_vd_product_ids', false) : array();
     echo '<p class="form-field _vd_product_ids_field">';
     echo '<label for="_vd_product_ids">';
     echo __('Products', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</label>';
     printf('<select id="_vd_product_ids" class="ajax_chosen_select_products_and_variations _vd_product_ids multiselect" name="_vd_product_ids[]" multiple="multiple" title="%s" data-placeholder="%s">', __('Start typing to search for products.', WOO_VOLDISC_PLUGIN_DOMAIN), __('Search for a product &hellip;', WOO_VOLDISC_PLUGIN_DOMAIN));
     foreach ($product_ids as $product_id) {
         $product = get_product($product_id);
         $product_name = woocommerce_get_formatted_product_name($product);
         printf('<option value="%s" %s>%s</option>', esc_attr($product_id), ' selected="selected" ', wp_kses_post($product_name));
     }
     echo '</select>';
     printf('<img class="help_tip" data-tip="%s" src="%s" height="16" width="16" />', __('For a customer to be allowed to apply this coupon, at least one of the chosen products must be in the cart and its quantity must be within the given minimum and maximum.', WOO_VOLDISC_PLUGIN_DOMAIN), esc_attr($woocommerce->plugin_url() . '/assets/images/help.png'));
     echo '</p>';
     $term_ids = !empty($post) && !empty($post->ID) ? get_post_meta($post->ID, '_vd_term_ids', false) : array();
     echo '<p class="form-field _vd_product_ids_field">';
     echo '<label for="_vd_term_ids">';
     echo __('Product Categories', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</label>';
     printf('<select id="_vd_term_ids" class="chosen_select" name="_vd_term_ids[]" multiple="multiple" title="%s" data-placeholder="%s">', __('Start typing to search for categories.', WOO_VOLDISC_PLUGIN_DOMAIN), __('Search for a category &hellip;', WOO_VOLDISC_PLUGIN_DOMAIN));
     $categories = get_terms('product_cat', 'orderby=name&hide_empty=0');
     if ($categories) {
         foreach ($categories as $category) {
             printf('<option value="%s" %s>%s</option>', esc_attr($category->term_id), in_array($category->term_id, $term_ids) ? ' selected="selected" ' : '', esc_html($category->name));
         }
     }
     echo '</select>';
     printf('<img class="help_tip" data-tip="%s" src="%s" height="16" width="16" />', __('If one or more categories are chosen, the coupon is valid if at least one product in the selected categories is in the cart and its quantity is within the given minimum and maximum.', WOO_VOLDISC_PLUGIN_DOMAIN), esc_attr($woocommerce->plugin_url() . '/assets/images/help.png'));
     echo '</p>';
     woocommerce_wp_text_input(array('id' => '_vd_min', 'label' => __('Minimum', WOO_VOLDISC_PLUGIN_DOMAIN), 'placeholder' => __('no restriction', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Input the minimum quantity that must be in the cart. The condition is met, if for any of the chosen products, or any product in the selected categories, the minimum quantity is in the cart.', WOO_VOLDISC_PLUGIN_DOMAIN), 'desc_tip' => true));
     woocommerce_wp_text_input(array('id' => '_vd_max', 'label' => __('Maximum', WOO_VOLDISC_PLUGIN_DOMAIN), 'placeholder' => __('no restriction', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Input the maximum quantity allowed in the cart. The condition is met, if for any of the chosen products, or any product in the selected categories, the quantity in the cart does not exceed the maximum.', WOO_VOLDISC_PLUGIN_DOMAIN), 'desc_tip' => true));
     woocommerce_wp_checkbox(array('id' => '_vd_auto', 'label' => __('Apply automatically', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Apply this coupon automatically when valid based on these conditions.', WOO_VOLDISC_PLUGIN_DOMAIN)));
     woocommerce_wp_checkbox(array('id' => '_vd_sum_by_term_id', 'label' => __('Sum categories', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Sum the number of units per category. If this is enabled, the quantity restrictions are based on the totals per category, instead of per individual product. This applies only to products in the selected categories, if any.', WOO_VOLDISC_PLUGIN_DOMAIN)));
     echo '<p class="description">';
     echo __('The coupon <strong>will only be restricted</strong>, if at least one product or category and a minimum or a maximum (or both) are set.', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo ' ';
     echo __('For product <strong>variations</strong>, if a variable product is chosen (i.e. the parent to its variations), the quantity in the cart used to check the minimum or maximum is the combined total of all variations in the cart.', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo ' ';
     echo __('If a product variation is chosen (i.e. a product variation derived by attribute from its parent product), the quantity check is made for that variation only, independent of other variations in the cart.', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo ' ';
     echo __('If both products and categories are indicated, one of the specified products or a product that belongs to one of the categories must meet the quantity restrictions.', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</p>';
     echo '<p>';
     echo __('<strong>Display Options</strong>', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo ' - ';
     echo __('For the products indicated and products in the selected categories, the product displayed can be enhanced with information based on the coupon\'s description and volume discount.', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</p>';
     echo '<p>';
     echo __('Show the <em>coupon description</em> for products on these pages:', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</p>';
     $description_display = get_post_meta($post->ID, '_vd_description_display', false);
     foreach (self::$display_indexes as $key => $label) {
         woocommerce_wp_checkbox(array('id' => '_vd_description_display_' . $key, 'label' => $label, 'value' => in_array($key, $description_display) ? 'yes' : ''));
     }
     echo '<p>';
     echo __('Show the <em>volume discount info</em> for products on these pages:', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</p>';
     $info_display = get_post_meta($post->ID, '_vd_info_display', false);
     foreach (self::$display_indexes as $key => $label) {
         woocommerce_wp_checkbox(array('id' => '_vd_info_display_' . $key, 'label' => $label, 'value' => in_array($key, $info_display) ? 'yes' : ''));
     }
     echo '<p>';
     echo __('<strong>Auto-apply Display Options</strong>', WOO_VOLDISC_PLUGIN_DOMAIN);
     echo '</p>';
     woocommerce_wp_textarea_input(array('id' => '_vd_auto_message_display', 'label' => __('Message', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('If not empty, display a message when the coupon is automatically applied.', WOO_VOLDISC_PLUGIN_DOMAIN)));
     woocommerce_wp_checkbox(array('id' => '_vd_auto_description_display', 'label' => __('Description', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Display the coupon description when the coupon is automatically applied.', WOO_VOLDISC_PLUGIN_DOMAIN)));
     woocommerce_wp_checkbox(array('id' => '_vd_auto_info_display', 'label' => __('Volume Discount Info', WOO_VOLDISC_PLUGIN_DOMAIN), 'description' => __('Display the <em>volume discount info</em> when the coupon is automatically applied.', WOO_VOLDISC_PLUGIN_DOMAIN)));
     echo '</div>';
     // .options_group
 }
开发者ID:tleonard2,项目名称:durablegbFeb,代码行数:85,代码来源:class-woocommerce-volume-discount-coupons-coupon.php

示例5: woocommerce_product_data_box


//.........这里部分代码省略.........
        echo '<input type="hidden" name="_length" value="' . get_post_meta($thepostid, '_length', true) . '" />';
        echo '<input type="hidden" name="_width" value="' . get_post_meta($thepostid, '_width', true) . '" />';
        echo '<input type="hidden" name="_height" value="' . get_post_meta($thepostid, '_height', true) . '" />';
    }
    // Shipping Class
    $classes = get_the_terms($thepostid, 'product_shipping_class');
    if ($classes && !is_wp_error($classes)) {
        $current_shipping_class = current($classes)->term_id;
    } else {
        $current_shipping_class = '';
    }
    $args = array('taxonomy' => 'product_shipping_class', 'hide_empty' => 0, 'show_option_none' => __('No shipping class', 'woocommerce'), 'name' => 'product_shipping_class', 'id' => 'product_shipping_class', 'selected' => $current_shipping_class, 'class' => 'select short');
    ?>
<p class="form-field dimensions_field"><label for="product_shipping_class"><?php 
    _e('Shipping class', 'woocommerce');
    ?>
</label> <?php 
    wp_dropdown_categories($args);
    ?>
 <span class="description"><?php 
    _e('Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce');
    ?>
</span></p><?php 
    do_action('woocommerce_product_options_dimensions');
    echo '</div>';
    echo '<div class="options_group">';
    // Visibility
    woocommerce_wp_select(array('id' => '_visibility', 'label' => __('Visibility', 'woocommerce'), 'options' => apply_filters('woocommerce_product_visibility_options', array('visible' => __('Catalog &amp; search', 'woocommerce'), 'catalog' => __('Catalog', 'woocommerce'), 'search' => __('Search', 'woocommerce'), 'hidden' => __('Hidden', 'woocommerce'))), 'description' => __('Define the loops this product should be visible in. It will still be accessible directly.', 'woocommerce')));
    // Featured
    woocommerce_wp_checkbox(array('id' => '_featured', 'label' => __('Featured', 'woocommerce'), 'description' => __('Enable this option to feature this product', 'woocommerce')));
    echo '</div>';
    echo '<div class="options_group hide_if_external">';
    // Purchase note
    woocommerce_wp_textarea_input(array('id' => '_purchase_note', 'label' => __('Purchase Note', 'woocommerce'), 'description' => __('Enter an optional note to send the customer after purchase.', 'woocommerce')));
    echo '</div>';
    echo '<div class="options_group show_if_downloadable">';
    // File URL
    $file_path = get_post_meta($post->ID, '_file_path', true);
    $field = array('id' => '_file_path', 'label' => __('File path', 'woocommerce'));
    echo '<p class="form-field"><label for="' . $field['id'] . '">' . $field['label'] . ':</label>
					<input type="text" class="short file_path" name="' . $field['id'] . '" id="' . $field['id'] . '" value="' . $file_path . '" placeholder="' . __('File path/URL', 'woocommerce') . '" />
					<input type="button"  class="upload_file_button button" value="' . __('Upload a file', 'woocommerce') . '" />
				</p>';
    // Download Limit
    woocommerce_wp_text_input(array('id' => '_download_limit', 'label' => __('Download Limit', 'woocommerce'), 'placeholder' => __('Unlimited', 'woocommerce'), 'description' => __('Leave blank for unlimited re-downloads.', 'woocommerce')));
    // Expirey
    woocommerce_wp_text_input(array('id' => '_download_expiry', 'label' => __('Download Expiry', 'woocommerce'), 'placeholder' => __('Never', 'woocommerce'), 'description' => __('Enter the number of days before a download link expires, or leave blank.', 'woocommerce')));
    do_action('woocommerce_product_options_downloads');
    echo '</div>';
    do_action('woocommerce_product_options_general_product_data');
    ?>
		</div>
		<div id="tax_product_data" class="panel woocommerce_options_panel">
			
			<?php 
    // Tax
    woocommerce_wp_select(array('id' => '_tax_status', 'label' => __('Tax Status', 'woocommerce'), 'options' => array('taxable' => __('Taxable', 'woocommerce'), 'shipping' => __('Shipping only', 'woocommerce'), 'none' => __('None', 'woocommerce'))));
    $tax_classes = array_filter(array_map('trim', explode("\n", get_option('woocommerce_tax_classes'))));
    $classes_options = array();
    $classes_options[''] = __('Standard', 'woocommerce');
    if ($tax_classes) {
        foreach ($tax_classes as $class) {
            $classes_options[sanitize_title($class)] = $class;
        }
    }
    woocommerce_wp_select(array('id' => '_tax_class', 'label' => __('Tax Class', 'woocommerce'), 'options' => $classes_options));
开发者ID:rajveerbeniwal,项目名称:rooms-dhkh,代码行数:67,代码来源:writepanel-product_data.php

示例6: do_action

    /**
     * woocommerce_variation_options_tax action.
     *
     * @since 2.5.0
     *
     * @param int     $loop
     * @param array   $variation_data
     * @param WP_Post $variation
     */
    do_action('woocommerce_variation_options_tax', $loop, $variation_data, $variation);
}
?>
			</div>
			<div>
				<?php 
woocommerce_wp_textarea_input(array('id' => "variable_description{$loop}", 'name' => "variable_description[{$loop}]", 'value' => $variation_object->get_description('edit'), 'label' => __('Description', 'woocommerce'), 'desc_tip' => true, 'description' => __('Enter an optional description for this variation.', 'woocommerce'), 'wrapper_class' => 'form-row form-row-full'));
?>
			</div>
			<div class="show_if_variation_downloadable" style="display: none;">
				<div class="form-row form-row-full downloadable_files">
					<label><?php 
_e('Downloadable files', 'woocommerce');
?>
</label>
					<table class="widefat">
						<thead>
							<div>
								<th><?php 
_e('Name', 'woocommerce');
?>
 <?php 
开发者ID:woocommerce,项目名称:woocommerce,代码行数:31,代码来源:html-variation-admin.php

示例7: order_status_data_meta_box

    /**
     * Display the order status data meta box
     *
     * @since 1.0.0
     */
    public function order_status_data_meta_box()
    {
        global $post;
        $status = new WC_Order_Status_Manager_Order_Status($post->ID);
        wp_nonce_field('wc_order_status_manager_save_data', 'wc_order_status_manager_meta_nonce');
        ?>

		<div id="order_status_options" class="panel woocommerce_options_panel">
			<div class="options_group">
				<?php 
        // Status Name
        woocommerce_wp_text_input(array('id' => 'post_title', 'label' => __('Name', WC_Order_Status_Manager::TEXT_DOMAIN), 'value' => $post->post_title));
        // Disable slug editing for core statuses
        $custom_attributes = array();
        if ($status->is_core_status()) {
            $custom_attributes['disabled'] = 'disabled';
        }
        // Slug
        woocommerce_wp_text_input(array('id' => 'post_name', 'label' => __('Slug', WC_Order_Status_Manager::TEXT_DOMAIN), 'value' => $post->post_name, 'custom_attributes' => $custom_attributes, 'desc_tip' => true, 'description' => __('Optional. If left blank, the slug will be automatically generated from the name. Maximum: 17 characters.', WC_Order_Status_Manager::TEXT_DOMAIN)));
        // Description
        woocommerce_wp_textarea_input(array('id' => 'post_excerpt', 'label' => __('Description', WC_Order_Status_Manager::TEXT_DOMAIN), 'desc_tip' => true, 'description' => __('Optional status description. If set, this will be shown to customers while viewing an order.', WC_Order_Status_Manager::TEXT_DOMAIN), 'value' => htmlspecialchars_decode($post->post_excerpt, ENT_QUOTES)));
        ?>
			</div><!-- // .options_group -->

			<div class="options_group">
				<?php 
        // Color
        woocommerce_wp_text_input(array('id' => '_color', 'label' => __('Color', WC_Order_Status_Manager::TEXT_DOMAIN), 'type' => 'text', 'class' => 'colorpick', 'default' => '#000000', 'desc_tip' => true, 'description' => __('Color displayed behind the order status image or name', WC_Order_Status_Manager::TEXT_DOMAIN)));
        // Status Icon
        $icon = $status->get_icon();
        $icon_attachment_src = '';
        if (is_numeric($icon)) {
            $icon_attachment_src = wp_get_attachment_image_src($icon, 'wc_order_status_icon');
        }
        ?>
				<p class="form-field _icon_field">
					<label for="_icon"><?php 
        _e('Icon', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</label>

					<input type="text" id="_icon" name="_icon" class="short" value="<?php 
        echo esc_attr($status->get_icon());
        ?>
" data-icon-image="<?php 
        echo esc_attr($icon_attachment_src ? $icon_attachment_src[0] : '');
        ?>
">

					<a href="#_icon" class="button upload-icon upload-icon-image" data-uploader-button-text="<?php 
        _e('Set as status icon', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
"><?php 
        _e("Select File", WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</a>
					<img class="help_tip" data-tip="<?php 
        _e("Optional status icon. If not supplied, then Name will be displayed to represent the status", WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
" src="<?php 
        echo esc_url(WC()->plugin_url());
        ?>
/assets/images/help.png" height="16" width="16" />
				</p>

				<?php 
        // Status Action Icon
        $action_icon = $status->get_action_icon();
        $action_icon_attachment_src = '';
        if (is_numeric($action_icon)) {
            $action_icon_attachment_src = wp_get_attachment_image_src($action_icon, 'wc_order_status_icon');
        }
        ?>
				<p class="form-field _action_icon_field">
					<label for="_action_icon"><?php 
        _e('Action Icon', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</label>

					<input type="text" id="_action_icon" name="_action_icon" class="short" value="<?php 
        echo esc_attr($status->get_action_icon());
        ?>
" data-icon-image="<?php 
        echo esc_attr($action_icon_attachment_src ? $action_icon_attachment_src[0] : '');
        ?>
">

					<a href="#_action_icon" class="button upload-icon upload-icon-image" data-uploader-button-text="<?php 
        _e('Set as status icon', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
"><?php 
        _e("Select File", WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</a>
					<img class="help_tip" data-tip="<?php 
//.........这里部分代码省略.........
开发者ID:seoduda,项目名称:Patua,代码行数:101,代码来源:class-wc-order-status-manager-admin-order-statuses.php

示例8: variable_fields

/**
 * Create new fields for variations
 *
 */
function variable_fields($loop, $variation_data)
{
    ?>
	 <tr>
	    <td>
		<?php 
    // Textarea
    woocommerce_wp_textarea_input(array('id' => '_textarea[' . $loop . ']', 'name' => 'shipping notes', 'label' => __('Shipping Notes', 'woocommerce'), 'placeholder' => '', 'description' => __('Enter the custom value here.', 'woocommerce'), 'value' => $variation_data['_textarea'][0]));
    // Textarea
    woocommerce_wp_textarea_input(array('id' => '_description[' . $loop . ']', 'name' => 'Description', 'label' => __('Model Description', 'woocommerce'), 'placeholder' => '', 'description' => __('Enter the description here.', 'woocommerce'), 'value' => $variation_data['_description'][0]));
    ?>
	    </td>
	</tr>
	<?php 
}
开发者ID:Jiersone,项目名称:mac,代码行数:19,代码来源:functions.php

示例9: output


//.........这里部分代码省略.........
" value="<?php 
        echo implode(',', array_keys($json_ids));
        ?>
" /> <img class="help_tip" data-tip='<?php 
        esc_attr_e('Cross-sells are products which you promote in the cart, based on the current product.', 'woocommerce');
        ?>
' src="<?php 
        echo WC()->plugin_url();
        ?>
/assets/images/help.png" height="16" width="16" />
					</p>
				</div>

				<div class="options_group grouping show_if_simple show_if_external">

					<p class="form-field">
						<label for="parent_id"><?php 
        _e('Grouping', 'woocommerce');
        ?>
</label>
						<input type="hidden" class="wc-product-search" style="width: 50%;" id="parent_id" name="parent_id" data-placeholder="<?php 
        esc_attr_e('Search for a product&hellip;', 'woocommerce');
        ?>
" data-action="woocommerce_json_search_grouped_products" data-allow_clear="true" data-multiple="false" data-exclude="<?php 
        echo intval($post->ID);
        ?>
" data-selected="<?php 
        $parent_id = absint($post->post_parent);
        if ($parent_id) {
            $parent = wc_get_product($parent_id);
            if (is_object($parent)) {
                $parent_title = wp_kses_post(html_entity_decode($parent->get_formatted_name(), ENT_QUOTES, get_bloginfo('charset')));
            }
            echo esc_attr($parent_title);
        }
        ?>
" value="<?php 
        echo $parent_id ? $parent_id : '';
        ?>
" /> <img class="help_tip" data-tip='<?php 
        _e('Set this option to make this product part of a grouped product.', 'woocommerce');
        ?>
' src="<?php 
        echo WC()->plugin_url();
        ?>
/assets/images/help.png" height="16" width="16" />
					</p>

					<?php 
        woocommerce_wp_hidden_input(array('id' => 'previous_parent_id', 'value' => absint($post->post_parent)));
        do_action('woocommerce_product_options_grouping');
        ?>
				</div>

				<?php 
        do_action('woocommerce_product_options_related');
        ?>
			</div>

			<div id="advanced_product_data" class="panel woocommerce_options_panel">

				<div class="options_group hide_if_external">
					<?php 
        // Purchase note
        woocommerce_wp_textarea_input(array('id' => '_purchase_note', 'label' => __('Purchase Note', 'woocommerce'), 'desc_tip' => 'true', 'description' => __('Enter an optional note to send the customer after purchase.', 'woocommerce')));
        ?>
				</div>

				<div class="options_group">
					<?php 
        // menu_order
        woocommerce_wp_text_input(array('id' => 'menu_order', 'label' => __('Menu order', 'woocommerce'), 'desc_tip' => 'true', 'description' => __('Custom ordering position.', 'woocommerce'), 'value' => intval($post->menu_order), 'type' => 'number', 'custom_attributes' => array('step' => '1')));
        ?>
				</div>

				<div class="options_group reviews">
					<?php 
        woocommerce_wp_checkbox(array('id' => 'comment_status', 'label' => __('Enable reviews', 'woocommerce'), 'cbvalue' => 'open', 'value' => esc_attr($post->comment_status)));
        do_action('woocommerce_product_options_reviews');
        ?>
				</div>

				<?php 
        do_action('woocommerce_product_options_advanced');
        ?>

			</div>

			<?php 
        self::output_variations();
        do_action('woocommerce_product_data_panels');
        do_action('woocommerce_product_write_panels');
        // _deprecated
        ?>

			<div class="clear"></div>

		</div>
		<?php 
    }
开发者ID:vkolova,项目名称:bgscena,代码行数:101,代码来源:class-wc-meta-box-product-data.php

示例10: wbm_product_meta

 public static function wbm_product_meta()
 {
     woocommerce_wp_textarea_input(array('id' => '_wbm_details_link', 'label' => __('Details Page Link', 'wbm'), 'placeholder' => '', 'description' => __('Enter details page link with http://', 'wbm')));
 }
开发者ID:shirso,项目名称:woo-booking-module,代码行数:4,代码来源:class-admin-product.php

示例11: order_status_email_data_meta_box

    /**
     * Display the order status email data meta box
     *
     * @since 1.0.0
     */
    public function order_status_email_data_meta_box()
    {
        global $post;
        wp_nonce_field('wc_order_status_manager_save_data', 'wc_order_status_manager_meta_nonce');
        ?>

		<div id="order_status_email_options" class="panel woocommerce_options_panel">
			<div class="options_group">

			<?php 
        // Status Email Name
        woocommerce_wp_text_input(array('id' => 'post_title', 'label' => __('Name', WC_Order_Status_Manager::TEXT_DOMAIN), 'value' => $post->post_title));
        // Status Email Type
        woocommerce_wp_select(array('id' => '_email_type', 'label' => __('Type', WC_Order_Status_Manager::TEXT_DOMAIN), 'options' => $this->email_types, 'desc_tip' => true, 'description' => __("A customer email is dispatched to the order's customer, and admin email is sent to the store admin (you can define individual recipient's).", WC_Order_Status_Manager::TEXT_DOMAIN)));
        // Status Email Description
        woocommerce_wp_textarea_input(array('id' => 'post_excerpt', 'label' => __('Description', WC_Order_Status_Manager::TEXT_DOMAIN), 'desc_tip' => true, 'description' => __('Optional email description. This is for informational purposes only.', WC_Order_Status_Manager::TEXT_DOMAIN), 'value' => htmlspecialchars_decode($post->post_excerpt, ENT_QUOTES)));
        // Status Email Dispatch conditions
        // TODO: Should we prefix 'any' with an underscore, or somehow reserve it?
        $status_options = array('any' => __('Any', WC_Order_Status_Manager::TEXT_DOMAIN));
        foreach (wc_get_order_statuses() as $slug => $name) {
            $status_options[str_replace('wc-', '', $slug)] = $name;
        }
        $conditions = get_post_meta($post->ID, '_email_dispatch_condition');
        // Parse existing condition parts
        if (!empty($conditions)) {
            foreach ($conditions as $key => $condition) {
                $parts = explode('_to_', $condition);
                $conditions[$key] = array('from' => $parts[0], 'to' => $parts[1]);
            }
        }
        ?>
			<fieldset class="form-field dispatch_field">
				<label for="_email_dispatch_condition"><?php 
        _e('When to dispatch', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</label>

				<table class="dispatch_conditions">

					<thead <?php 
        if (empty($conditions)) {
            ?>
style="display:none;"<?php 
        }
        ?>
>
						<tr>
							<th><?php 
        _e('From Status', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</th>
							<th colspan="2"><?php 
        _e('To Status', WC_Order_Status_Manager::TEXT_DOMAIN);
        ?>
</th>
						</tr>
					</thead>

					<tbody <?php 
        if (empty($conditions)) {
            ?>
style="display:none;"<?php 
        }
        ?>
>
						<?php 
        if (!empty($conditions)) {
            foreach ($conditions as $key => $condition) {
                ?>
						<tr class="condition">
							<td>
								<select name="_email_dispatch_condition[<?php 
                echo $key;
                ?>
][from]">
									<?php 
                foreach ($status_options as $slug => $name) {
                    ?>
										<option value="<?php 
                    echo esc_attr($slug);
                    ?>
" <?php 
                    selected($slug, $condition['from']);
                    ?>
><?php 
                    echo esc_html($name);
                    ?>
</option>
									<?php 
                }
                ?>
								</select>
							</td>
							<td>
								<select name="_email_dispatch_condition[<?php 
//.........这里部分代码省略.........
开发者ID:seoduda,项目名称:Patua,代码行数:101,代码来源:class-wc-order-status-manager-admin-order-status-emails.php

示例12: meta_box_advanced

 function meta_box_advanced()
 {
     global $woocommerce, $post;
     woocommerce_wp_textarea_input(array('id' => 'wpl_amazon_product_description', 'label' => __('Custom Product Description', 'wpla'), 'placeholder' => 'Leave this empty to use the default description.', 'value' => get_post_meta($post->ID, '_amazon_product_description', true)));
     woocommerce_wp_text_input(array('id' => 'wpl_amazon_asin', 'label' => __('ASIN', 'wpla'), 'placeholder' => 'ASIN', 'description' => 'Do not change this unless you know what you are doing.', 'value' => get_post_meta($post->ID, '_wpla_asin', true)));
     // $tb_url = 'admin-ajax.php?action=wpla_show_product_matches&id='.$post->ID.'&width=640&height=420';
     // echo '<a href="'.$tb_url.'" class="thickbox" title="Match product on Amazon"><img src="'.WPLA_URL.'/img/search3.png" alt="match" /></a>';
 }
开发者ID:imranshuvo,项目名称:wp-lister-for-amazon,代码行数:8,代码来源:Woo_ProductMetaBox.php

示例13: display_field_options

 public static function display_field_options($fieldoptions)
 {
     global $woocommerce, $post;
     foreach ($fieldoptions as $key => $fields) {
         if (isset($fields['type'])) {
             switch ($fields['type']) {
                 case 'select':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_select($fields);
                     break;
                 case 'checkbox':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_checkbox($fields);
                     break;
                 case 'radio':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_radio($fields);
                     break;
                 case 'hidden':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_hidden_input($fields);
                     break;
                 case 'number':
                 case 'text':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_text_input($fields);
                     break;
                 case 'textarea':
                     if ($result = get_post_meta($post->ID, $fields['id'], true)) {
                         $fields['value'] = $result;
                     }
                     woocommerce_wp_textarea_input($fields);
                     break;
             }
         }
     }
 }
开发者ID:arifur,项目名称:woocommerce-pay-what-you-want,代码行数:47,代码来源:woocommerce-pay-what-you-want.php

示例14: output


//.........这里部分代码省略.........
" value="<?php 
        echo implode(',', array_keys($json_ids));
        ?>
" /> <img class="help_tip" data-tip='<?php 
        _e('Cross-sells are products which you promote in the cart, based on the current product.', 'woocommerce');
        ?>
' src="<?php 
        echo WC()->plugin_url();
        ?>
/assets/images/help.png" height="16" width="16" />
					</p>
				</div>

				<div class="options_group grouping show_if_simple show_if_external">

					<p class="form-field">
						<label for="parent_id"><?php 
        _e('Grouping', 'woocommerce');
        ?>
</label>
						<input type="hidden" class="wc-product-search" style="width: 50%;" id="parent_id" name="parent_id" data-placeholder="<?php 
        _e('Search for a product&hellip;', 'woocommerce');
        ?>
" data-action="woocommerce_json_search_grouped_products" data-allow_clear="true" data-multiple="false" data-exclude="<?php 
        echo intval($post->ID);
        ?>
" data-selected="<?php 
        $parent_id = absint($post->post_parent);
        if ($parent_id) {
            $parent = wc_get_product($parent_id);
            if (is_object($parent)) {
                $parent_title = wp_kses_post(html_entity_decode($parent->get_formatted_name()));
            }
            echo esc_attr($parent_title);
        }
        ?>
" value="<?php 
        echo $parent_id ? $parent_id : '';
        ?>
" /> <img class="help_tip" data-tip='<?php 
        _e('Set this option to make this product part of a grouped product.', 'woocommerce');
        ?>
' src="<?php 
        echo WC()->plugin_url();
        ?>
/assets/images/help.png" height="16" width="16" />
					</p>

					<?php 
        woocommerce_wp_hidden_input(array('id' => 'previous_parent_id', 'value' => absint($post->post_parent)));
        do_action('woocommerce_product_options_grouping');
        ?>
				</div>

				<?php 
        do_action('woocommerce_product_options_related');
        ?>
			</div>

			<div id="advanced_product_data" class="panel woocommerce_options_panel">

				<div class="options_group hide_if_external">
					<?php 
        // Purchase note
        woocommerce_wp_textarea_input(array('id' => '_purchase_note', 'label' => __('Purchase Note', 'woocommerce'), 'desc_tip' => 'true', 'description' => __('Enter an optional note to send the customer after purchase.', 'woocommerce')));
        ?>
				</div>

				<div class="options_group">
					<?php 
        // menu_order
        woocommerce_wp_text_input(array('id' => 'menu_order', 'label' => __('Menu order', 'woocommerce'), 'desc_tip' => 'true', 'description' => __('Custom ordering position.', 'woocommerce'), 'value' => intval($post->menu_order), 'type' => 'number', 'custom_attributes' => array('step' => '1')));
        ?>
				</div>

				<div class="options_group reviews">
					<?php 
        woocommerce_wp_checkbox(array('id' => 'comment_status', 'label' => __('Enable reviews', 'woocommerce'), 'cbvalue' => 'open', 'value' => esc_attr($post->comment_status)));
        do_action('woocommerce_product_options_reviews');
        ?>
				</div>

				<?php 
        do_action('woocommerce_product_options_advanced');
        ?>

			</div>

			<?php 
        self::output_variations();
        do_action('woocommerce_product_data_panels');
        do_action('woocommerce_product_write_panels');
        // _deprecated
        ?>

			<div class="clear"></div>

		</div>
		<?php 
    }
开发者ID:WordCommerce,项目名称:woocommerce,代码行数:101,代码来源:class-wc-meta-box-product-data.php

示例15: meta_box_advanced

    function meta_box_advanced()
    {
        global $post;
        ?>
        <style type="text/css">
            #wplister-ebay-advanced label { 
            	float: left;
            	width: 33%;
            	line-height: 2em;
            }
            #wplister-ebay-advanced input, 
            #wplister-ebay-advanced select.select { 
            	width: 62%; 
            }
            #wplister-ebay-advanced input.checkbox { 
            	width:auto; 
            }
            #wplister-ebay-advanced input.input_specs,
            #wplister-ebay-advanced input.select_specs { 
            	width:100%; 
            }

            #wplister-ebay-advanced .description { 
            	clear: both;
            	margin-left: 33%;
            }
            #wplister-ebay-advanced .wpl_ebay_hide_from_unlisted_field .description,
            #wplister-ebay-advanced .wpl_ebay_bestoffer_enabled_field .description { 
            	margin-left: 0.3em;
				height: 1.4em;
				display: inline-block;
            	vertical-align: bottom;
            }

        </style>
        <?php 
        do_action('wple_before_advanced_ebay_options');
        woocommerce_wp_text_input(array('id' => 'wpl_ebay_buynow_price', 'label' => __('Buy Now Price', 'wplister'), 'placeholder' => __('Buy Now Price', 'wplister'), 'description' => __('The optional Buy Now Price is only used for auction style listings. It has no effect on fixed price listings.', 'wplister'), 'desc_tip' => true, 'class' => 'wc_input_price', 'value' => get_post_meta($post->ID, '_ebay_buynow_price', true)));
        woocommerce_wp_text_input(array('id' => 'wpl_ebay_reserve_price', 'label' => __('Reserve Price', 'wplister'), 'placeholder' => __('Reserve Price', 'wplister'), 'description' => __('The lowest price at which you are willing to sell the item. Not all categories support a reserve price.<br>Note: This only applies to auction style listings.', 'wplister'), 'desc_tip' => true, 'class' => 'wc_input_price', 'value' => get_post_meta($post->ID, '_ebay_reserve_price', true)));
        woocommerce_wp_text_input(array('id' => 'wpl_ebay_gallery_image_url', 'label' => __('Gallery Image URL', 'wplister'), 'placeholder' => __('Enter an URL if you want to use a custom gallery image on eBay.', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_gallery_image_url', true)));
        woocommerce_wp_checkbox(array('id' => 'wpl_ebay_global_shipping', 'label' => __('Global Shipping', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_global_shipping', true)));
        woocommerce_wp_checkbox(array('id' => 'wpl_ebay_hide_from_unlisted', 'label' => __('Hide from eBay', 'wplister'), 'description' => __('Hide this product from the list of products currently not listed on eBay.', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_hide_from_unlisted', true)));
        woocommerce_wp_checkbox(array('id' => 'wpl_ebay_bestoffer_enabled', 'label' => __('Best Offer', 'wplister'), 'description' => __('Enable Best Offer to allow a buyer to make a lower-priced binding offer.', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_bestoffer_enabled', true)));
        woocommerce_wp_text_input(array('id' => 'wpl_ebay_bo_autoaccept_price', 'label' => __('Auto accept price', 'wplister'), 'placeholder' => __('The price at which Best Offers are automatically accepted.', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_bo_autoaccept_price', true)));
        woocommerce_wp_text_input(array('id' => 'wpl_ebay_bo_minimum_price', 'label' => __('Minimum price', 'wplister'), 'placeholder' => __('Specifies the minimum acceptable Best Offer price.', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_bo_minimum_price', true)));
        // get listing object
        $listing = $this->get_current_ebay_item();
        $wpl_account_id = $listing && $listing->account_id ? $listing->account_id : get_option('wplister_default_account_id');
        $wpl_site_id = $listing ? $listing->site_id : get_option('wplister_ebay_site_id');
        // get available seller profiles
        $wpl_seller_profiles_enabled = get_option('wplister_ebay_seller_profiles_enabled');
        $wpl_seller_shipping_profiles = get_option('wplister_ebay_seller_shipping_profiles');
        $wpl_seller_payment_profiles = get_option('wplister_ebay_seller_payment_profiles');
        $wpl_seller_return_profiles = get_option('wplister_ebay_seller_return_profiles');
        if (isset(WPLE()->accounts[$wpl_account_id])) {
            $account = WPLE()->accounts[$wpl_account_id];
            $wpl_seller_profiles_enabled = $account->seller_profiles;
            $wpl_seller_shipping_profiles = maybe_unserialize($account->shipping_profiles);
            $wpl_seller_payment_profiles = maybe_unserialize($account->payment_profiles);
            $wpl_seller_return_profiles = maybe_unserialize($account->return_profiles);
        }
        // $wpl_seller_profiles_enabled	= get_option('wplister_ebay_seller_profiles_enabled');
        if ($wpl_seller_profiles_enabled) {
            // $wpl_seller_shipping_profiles	= get_option('wplister_ebay_seller_shipping_profiles');
            // $wpl_seller_payment_profiles	= get_option('wplister_ebay_seller_payment_profiles');
            // $wpl_seller_return_profiles		= get_option('wplister_ebay_seller_return_profiles');
            // echo "<pre>";print_r($wpl_seller_payment_profiles);echo"</pre>";#die();
            if (is_array($wpl_seller_payment_profiles)) {
                $seller_payment_profiles = array('' => __('-- use profile setting --', 'wplister'));
                foreach ($wpl_seller_payment_profiles as $seller_profile) {
                    $seller_payment_profiles[$seller_profile->ProfileID] = $seller_profile->ProfileName . ' - ' . $seller_profile->ShortSummary;
                }
                woocommerce_wp_select(array('id' => 'wpl_ebay_seller_payment_profile_id', 'label' => __('Payment policy', 'wplister'), 'options' => $seller_payment_profiles, 'value' => get_post_meta($post->ID, '_ebay_seller_payment_profile_id', true)));
            }
            if (is_array($wpl_seller_return_profiles)) {
                $seller_return_profiles = array('' => __('-- use profile setting --', 'wplister'));
                foreach ($wpl_seller_return_profiles as $seller_profile) {
                    $seller_return_profiles[$seller_profile->ProfileID] = $seller_profile->ProfileName . ' - ' . $seller_profile->ShortSummary;
                }
                woocommerce_wp_select(array('id' => 'wpl_ebay_seller_return_profile_id', 'label' => __('Return policy', 'wplister'), 'options' => $seller_return_profiles, 'value' => get_post_meta($post->ID, '_ebay_seller_return_profile_id', true)));
            }
        }
        woocommerce_wp_textarea_input(array('id' => 'wpl_ebay_payment_instructions', 'label' => __('Payment Instructions', 'wplister'), 'value' => get_post_meta($post->ID, '_ebay_payment_instructions', true)));
        // $this->showCategoryOptions();
        // $this->showItemSpecifics();
        // $this->showCompatibilityTable();
        // WPL_WooFrontEndIntegration::showCompatibilityList();
        if (get_option('wplister_external_products_inventory') == 1) {
            $this->enabledInventoryOnExternalProducts();
        }
        // woocommerce_wp_checkbox( array( 'id' => 'wpl_update_ebay_on_save', 'wrapper_class' => 'update_ebay', 'label' => __('Update on save?', 'wplister') ) );
        do_action('wple_after_advanced_ebay_options');
    }
开发者ID:booklein,项目名称:wpbookle,代码行数:93,代码来源:WooProductMetaBox.php


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