#35349 closed enhancement (fixed)
Tag meta-boxes do not offer suggestions in custom contexts
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch commit |
Focuses: | javascript | Cc: |
Description
I'm registering a custom metaboxes before and after TinyMCE like this:
add_action( 'edit_form_after_title', 'jjj_editor_above' ); add_action( 'edit_form_after_editor', 'jjj_editor_below' );
These look like:
do_meta_boxes( $GLOBALS['post_type'], 'above_editor', $GLOBALS['post'] ); do_meta_boxes( $GLOBALS['post_type'], 'below_editor', $GLOBALS['post'] );
When you drag a non-hierarchical taxonomy meta-box into one of these custom areas and reload the page, jQuery Suggest stops working. This is because:
post.js
targets '#side-sortables, #normal-sortables, #advanced-sortables'
...when it could target...
.meta-box-sortables
I can fix this myself by copying that bit from post.js
(see below) but, I think WordPress core can safely prevent plugins from needing to handle this on their own:
/* Custom Meta Box Locations */ $( '#above_editor-sortables, #below_editor-sortables' ).children( 'div.postbox' ).each( function() { if ( this.id.indexOf( 'tagsdiv-' ) === 0 ) { window.tagBox && window.tagBox.init(); return false; } } );
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
@johnjamesjacoby this looks like a reasonable enhancement; its a very small change that earns us some more flexibility with using tags on the post page. the only possible side effects i see would be unexpected application for
.meta-box-sortables
areas which seems unlikely.I tested the patch and verified core tags still work as expected.