custom-metadata
custom-metadata copied to clipboard
'include' paramater doesn't work for groups
With latest WordPress (3.3.1 and 3.4-alpha). The paramater works for individual fields but not for groups
Does the 'include' parameter work for fields inside of a multifield?
I have a multifield that belongs to two different post types. Inside of the multifield, I want to include a specific field inside of only one of the post types.
So essentially I have:
x_add_metadata_field( 'canadian_medallists_sport', array('games', 'sports'), array(
'group' => 'medallists_options_metabox_group',
'multifield' => 'canadian_medallists',
'label' => 'Sport',
'field_type' => 'text',
'include' => 'canadian_medallists_sport_callback',
) );
function canadian_medallists_sport_callback( $thing_slug, $thing, $object_type, $object_id, $object_slug ) {
return 'games' == get_post_type( $object_id );
}
However this does not seem to work.