Opened 6 years ago
Last modified 4 years ago
#29821 new defect (bug)
bulk_edit_custom_box hook causes tags to display within created fieldset
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Quick/Bulk Edit | Keywords: | |
Focuses: | Cc: |
Description
I have a custom post type that I am trying to add some fields to for bulk editing. My fieldset displays, but the tags field somehow is getting inserted into the fieldset being generated. It's extremely strange.
Bulk Edit panel without my fieldset:
Bulk Edit panel with my fieldset:
My code to generate the bulk edit custom box:
/** * Display the custom bulk edit box * * @since 3.0 * @access public * @action bulk_edit_custom_box */ public function bulk_edit_custom_box( $column_name, $post_type ) { if ( $post_type != MP_Product::get_post_type() || $column_name != 'product_price' ) { return; } ?> <fieldset id="bulk-edit-col-product-price" class="inline-edit-col-left" style="clear:left"> <div class="inline-edit-col clearfix"> <label class="alignleft"><span class="title"><?php _e('Price', 'mp'); ?></span><span class="input-text-wrap"><input type="text" name="product_price" style="width:100px" /></span></label> <label class="alignleft" style="margin-left:15px"><span class="title"><?php _e('Sale Price', 'mp'); ?></span><span class="input-text-wrap"><input type="text" name="product_sale_price" style="width:100px" /></span></label> <input type="hidden" name="bulk_edit_product_nonce" value="<?php echo wp_create_nonce('bulk_edit_product'); ?>" /> </div> </fieldset> <?php }
This is the code that is being generated in my debugger:
<fieldset id="bulk-edit-col-product-price" class="inline-edit-col-left" style="clear:left"><label class="inline-edit-tags"> <span class="title">Product Tags</span> <textarea cols="22" rows="1" name="tax_input[product_tag]" class="tax_input_product_tag"></textarea> </label> <div class="inline-edit-col clearfix"> <label class="alignleft"><span class="title">Price</span><span class="input-text-wrap"><input name="product_price" style="width:100px" type="text"></span></label> <label class="alignleft" style="margin-left:15px"><span class="title">Sale Price</span><span class="input-text-wrap"><input name="product_sale_price" style="width:100px" type="text"></span></label> <input name="bulk_edit_product_nonce" value="5e55f56276" type="hidden"> </div> </fieldset>
Notice how the tags field is being inserted into my fieldset. It seems as thought the tags field is being inserted via javascript into whatever the last fieldset in the panel is.
Here's the same fields in the quick edit panel:
This is how it should show up.
Change History (4)
Note: See
TracTickets for help on using
tickets.
I'm having this issue as well in WP 4.3. Did anyone ever look into this?