acf_field_flexible_content::pre_render_fields
Runs on the "acf/pre_render_fields" filter. Used to signify that we're currently rendering a Flexible Content field.
Метод класса: acf_field_flexible_content{}
Хуков нет.
Возвращает
array.
Использование
$acf_field_flexible_content = new acf_field_flexible_content(); $acf_field_flexible_content->pre_render_fields( $fields, $post_id );
- $fields(массив) (обязательный)
- The main field array.
- $post_id(разное)
- The post ID for the field being rendered.
По умолчанию:false
Список изменений
| С версии 6.5 | Введена. |
Код acf_field_flexible_content::pre_render_fields() acf field flexible content::pre render fields ACF 6.8.8
public function pre_render_fields( $fields, $post_id = false ) {
if ( is_admin() ) {
$this->post_id = $post_id;
}
return $fields;
}