-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context location setup #836
Conversation
… in the post editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this looks good. I left a couple comments/questions inline. Let me know if you have any questions.
} | ||
|
||
// Include a generic context wrapper and the postbox wrapper. | ||
$classes[] = 'postbox cmb2-context-wrap'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you have a specific reason, I think i'll nix the postbox class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the postbox
class ensures it looks like the other metaboxes. I can create a conditional if you'd prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@norcross makes sense. I think I was seeing it cached, so it looked a little wonky. What do you think about outputting the entire metabox markup, allowing "metaboxes" in those other locations? (let's not worry about that for now)
if ( ! $this->show_on() ) { | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll probably need to check if the we're looking at the right post-type before we output the form. See the post-type loop in CMB2_hookup::add_metaboxes()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…ion instead of using the filter. including the post type check for calling the form
💥 thank you Mr. @norcross! |
Changes proposed in this pull request
extending the use of the
context
arg to allow for placement in other locations inside the post editor. new areas:edit_form_top
actionedit_form_before_permalink
actionedit_form_after_title
actionedit_form_after_editor
action