acf_field_flexible_content::clone_any_field()
clone_any_field
This function will update clone field settings based on the origional field
Метод класса: acf_field_flexible_content{}
Хуков нет.
Возвращает
$clone
.
Использование
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->clone_any_field( $field, $clone_field );
- $field (обязательный)
- -
- $clone_field (обязательный)
- -
Список изменений
С версии 5.3.8 | Введена. |
Код acf_field_flexible_content::clone_any_field() acf field flexible content::clone any field ACF 6.0.4
function clone_any_field( $field, $clone_field ) { // remove parent_layout // - allows a sub field to be rendered as a normal field unset( $field['parent_layout'] ); // attempt to merger parent_layout if ( isset( $clone_field['parent_layout'] ) ) { $field['parent_layout'] = $clone_field['parent_layout']; } // return return $field; }