Skip to content

Commit

Permalink
Fix metabox form output for taxonomy terms
Browse files Browse the repository at this point in the history
Addresses CMB2#552. Wraps the existing taxonomy term metabox output in a
table and associated tbody, tr, and td elements to match default
WordPress markup.
  • Loading branch information
MickeyKay committed Dec 21, 2015
1 parent b3b78a5 commit 19521d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/CMB2.php
Expand Up @@ -184,7 +184,7 @@ public function show_form( $object_id = 0, $object_type = '' ) {
*/
do_action( "cmb2_before_{$object_type}_form_{$this->cmb_id}", $object_id, $this );

echo '<div class="cmb2-wrap form-table"><div id="cmb2-metabox-', sanitize_html_class( $this->cmb_id ), '" class="cmb2-metabox cmb-field-list">';
echo '<table class="form-table"><tbody><tr class="form-field"><td scope="row"><div class="cmb2-wrap"><div id="cmb2-metabox-', sanitize_html_class( $this->cmb_id ), '" class="cmb2-metabox cmb-field-list">';

foreach ( $this->prop( 'fields' ) as $field_args ) {

Expand Down Expand Up @@ -214,7 +214,7 @@ public function show_form( $object_id = 0, $object_type = '' ) {
}
}

echo '</div></div>';
echo '</div></div></td></tr></tbody></table>';

$this->render_hidden_fields();

Expand Down

0 comments on commit 19521d5

Please sign in to comment.