Closed CreativeDive closed 11 months ago
A possible workaround for me is now the following way:
function acf_add_setting_to_presentation_tab( $field ) {
function add_setting( $field ) {
acf_render_field_setting( $field, array(...) );
}
$field_types = acf_get_field_types();
foreach ( $field_types as $field_type ) {
add_action( 'acf/render_field_presentation_settings/type=' . $field_type->name, 'add_setting' );
}
}
add_action( 'acf/init', 'acf_add_setting_to_presentation_tab' );
It's not possible to use the legacy action names for new functionality.
You'll need to use the new actions, such as acf/field_group/render_field_settings_tab/presentation
as detailed in the release notes: https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/#custom-field-setting-tab
Ahhhh, my bad. Thank you for clarification.
All good! Re-reading our docs we're not too clear on this, so I'll request this be clarified too!
Hey,
I've noticed it's not possible to show field settings for a specific tab in the case there is no field type defined. I want to add a custom field setting for all field types, but this is not possible. Only if a field type is defined I can see my custom field setting for the specific tab.
Is not working:
Is working: