Add a tip for default selections, and use opt groups for the long bulk edit list
This commit is contained in:
parent
c40fb45725
commit
674802c3ac
|
@ -753,25 +753,35 @@ class WC_Meta_Box_Product_Data {
|
|||
|
||||
<p class="toolbar">
|
||||
<a href="#" class="close_all"><?php _e( 'Close all', 'woocommerce' ); ?></a><a href="#" class="expand_all"><?php _e( 'Expand all', 'woocommerce' ); ?></a>
|
||||
<strong><?php _e( 'Bulk edit:', 'woocommerce' ); ?></strong>
|
||||
<select id="field_to_edit">
|
||||
<option value="toggle_enabled"><?php _e( 'Toggle "Enabled"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_downloadable"><?php _e( 'Toggle "Downloadable"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_virtual"><?php _e( 'Toggle "Virtual"', 'woocommerce' ); ?></option>
|
||||
<option value="delete_all"><?php _e( 'Delete all variations', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price"><?php _e( 'Prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price_increase"><?php _e( 'Prices increase by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price_decrease"><?php _e( 'Prices decrease by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price"><?php _e( 'Sale prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price_increase"><?php _e( 'Sale prices increase by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price_decrease"><?php _e( 'Sale prices decrease by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_stock"><?php _e( 'Stock', 'woocommerce' ); ?></option>
|
||||
<option value="variable_weight"><?php _e( 'Weight', 'woocommerce' ); ?></option>
|
||||
<option value="variable_length"><?php _e( 'Length', 'woocommerce' ); ?></option>
|
||||
<option value="variable_width"><?php _e( 'Width', 'woocommerce' ); ?></option>
|
||||
<option value="variable_height"><?php _e( 'Height', 'woocommerce' ); ?></option>
|
||||
<option value="variable_download_limit"><?php _e( 'Download limit', 'woocommerce' ); ?></option>
|
||||
<option value="variable_download_expiry"><?php _e( 'Download Expiry', 'woocommerce' ); ?></option>
|
||||
<option value=""><?php _e( 'Choose a field to bulk edit…', 'woocommerce' ); ?></option>
|
||||
<optgroup label="<?php esc_attr_e( 'Status', 'woocommerce' ); ?>">
|
||||
<option value="toggle_enabled"><?php _e( 'Toggle "Enabled"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_downloadable"><?php _e( 'Toggle "Downloadable"', 'woocommerce' ); ?></option>
|
||||
<option value="toggle_virtual"><?php _e( 'Toggle "Virtual"', 'woocommerce' ); ?></option>
|
||||
<option value="delete_all"><?php _e( 'Delete all variations', 'woocommerce' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_attr_e( 'Pricing', 'woocommerce' ); ?>">
|
||||
<option value="variable_regular_price"><?php _e( 'Prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price_increase"><?php _e( 'Prices increase by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_regular_price_decrease"><?php _e( 'Prices decrease by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price"><?php _e( 'Sale prices', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price_increase"><?php _e( 'Sale prices increase by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
<option value="variable_sale_price_decrease"><?php _e( 'Sale prices decrease by (fixed amount or %)', 'woocommerce' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_attr_e( 'Inventory', 'woocommerce' ); ?>">
|
||||
<option value="variable_stock"><?php _e( 'Stock', 'woocommerce' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>">
|
||||
<option value="variable_length"><?php _e( 'Length', 'woocommerce' ); ?></option>
|
||||
<option value="variable_width"><?php _e( 'Width', 'woocommerce' ); ?></option>
|
||||
<option value="variable_height"><?php _e( 'Height', 'woocommerce' ); ?></option>
|
||||
<option value="variable_weight"><?php _e( 'Weight', 'woocommerce' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_attr_e( 'Downloadable products', 'woocommerce' ); ?>">
|
||||
<option value="variable_download_limit"><?php _e( 'Download limit', 'woocommerce' ); ?></option>
|
||||
<option value="variable_download_expiry"><?php _e( 'Download Expiry', 'woocommerce' ); ?></option>
|
||||
</optgroup>
|
||||
<?php do_action( 'woocommerce_variable_product_bulk_edit_actions' ); ?>
|
||||
</select>
|
||||
<a class="button bulk_edit"><?php _e( 'Go', 'woocommerce' ); ?></a>
|
||||
|
@ -873,7 +883,7 @@ class WC_Meta_Box_Product_Data {
|
|||
|
||||
<button type="button" class="button link_all_variations" <?php disabled( $variation_attribute_found, false ); ?>><?php _e( 'Link all variations', 'woocommerce' ); ?></button>
|
||||
|
||||
<strong><?php _e( 'Default selections:', 'woocommerce' ); ?></strong>
|
||||
<strong><?php _e( 'Defaults', 'woocommerce' ); ?>: <span class="tips" data-tip="<?php _e( 'These are the attributes that will be pre-selected on the frontend.', 'woocommerce' ); ?>">[?]</span></strong>
|
||||
<?php
|
||||
$default_attributes = maybe_unserialize( get_post_meta( $post->ID, '_default_attributes', true ) );
|
||||
foreach ( $attributes as $attribute ) {
|
||||
|
|
Loading…
Reference in New Issue