-
Notifications
You must be signed in to change notification settings - Fork 566
Context location setup #836
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
Conversation
… in the post editor.
jtsternberg
left a comment
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.
includes/CMB2_hookup.php
Outdated
| return $classes; | ||
| } | ||
|
|
||
| // Include a generic context wrapper and the postbox wrapper. |
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
contextarg to allow for placement in other locations inside the post editor. new areas:edit_form_topactionedit_form_before_permalinkactionedit_form_after_titleactionedit_form_after_editoraction