acf_field__accordion::render_field_settings
Create extra options for your field. This is rendered when editing a field. The value of $field['name'] can be used (like bellow) to save extra data to the $field
Method of the class: acf_field__accordion{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_field__accordion = new acf_field__accordion(); $acf_field__accordion->render_field_settings( $field );
- $field(required)
- .
Changelog
| Since 3.6 | Introduced. |
acf_field__accordion::render_field_settings() acf field accordion::render field settings code ACF 6.0.4
function render_field_settings( $field ) {
acf_render_field_setting(
$field,
array(
'label' => __( 'Open', 'acf' ),
'instructions' => __( 'Display this accordion as open on page load.', 'acf' ),
'name' => 'open',
'type' => 'true_false',
'ui' => 1,
)
);
acf_render_field_setting(
$field,
array(
'label' => __( 'Multi-expand', 'acf' ),
'instructions' => __( 'Allow this accordion to open without closing others.', 'acf' ),
'name' => 'multi_expand',
'type' => 'true_false',
'ui' => 1,
)
);
acf_render_field_setting(
$field,
array(
'label' => __( 'Endpoint', 'acf' ),
'instructions' => __( 'Define an endpoint for the previous accordion to stop. This accordion will not be visible.', 'acf' ),
'name' => 'endpoint',
'type' => 'true_false',
'ui' => 1,
)
);
}