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
Метод класса: acf_field__accordion{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$acf_field__accordion = new acf_field__accordion(); $acf_field__accordion->render_field_settings( $field );
- $field (обязательный)
- -
Список изменений
С версии 3.6 | Введена. |
Код acf_field__accordion::render_field_settings() acf field accordion::render field settings 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, ) ); }