-
Notifications
You must be signed in to change notification settings - Fork 0
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
New field group registration #89
Conversation
README.md
Outdated
'operator' => '==', | ||
'value' => 'page', | ||
[ | ||
'param' => 'post_type', |
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.
Missing 'operator' => '==',
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.
Fixed.
includes/class-core.php
Outdated
'param' => 'post_type', | ||
'operator' => '==', | ||
'value' => $post_type, | ||
'param' => 'post_type', |
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.
Missing 'operator' => '==',
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.
Fixed.
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.
Missing operator args in location args. Except from that: works like a charm!
A simpler field group registration logic with new filters for overriding all field group parameters and a lot less code.
Highlights:
hogan/field_group/<name>/args
for overriding all field group parameters.hogan/field_group/default/supported_post_types
for adding Hogan support to custom post types without the hassle of writing the location parameter correctly. (This filter is for the default field group only, custom field groups must define thelocation
parameter.)hogan/field_group/<name>/fields_before_flexible_content
hogan/field_group/<name>/fields_after_flexible_content
hogan/field_group/<name>/location
hogan/field_group/<name>/hide_on_screen
hogan/supported_post_types
hogan_deregister_default_field_group()
hogan_register_field_group()
get_field_group_default_location()
Test code / Examples:
Add supported for more post types to default field groups.
Disable default field group.
Override default field group arguments.
Do a deprecated hide_on_screen filter for the default field group. Reinstate the format meta box.
Add new custom field group.