Skip to content

Conversation

@norcross
Copy link
Collaborator

Changes proposed in this pull request

  • adds title display for context metaboxes with expand / collapse toggle

$classes = 'postbox context-' . $cmb->prop( 'context' ) . '-box context-box ';
$classes .= in_array( $cmb->cmb_id, $hidden ) ? ' hide-if-js' : '';
$classes .= postbox_classes( $cmb->cmb_id, $screen->id );
$classes = 'postbox context-' . $this->cmb->prop( 'context' ) . '-box context-box postbox-container ';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you add the postbox-container class as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The postbox-container class was being used to style the field rows, but I refactored it a bit so that it's not needed. You can see those changes in Update context metabox output to handle no-title or no-wrap better

// Call our before hook.
if ( ! empty( $this->cmb->prop( 'title' ) ) ) {
$this::context_box_title_markup_open( $this->cmb );
$this->context_box_title_markup_open( $this->cmb );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're not going to use the $cmb variable passed in the function, can be removed from here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jtsternberg jtsternberg merged commit 651c0d6 into trunk Jan 17, 2017
jtsternberg added a commit that referenced this pull request Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants