ACF_Local_JSON::include_fields() public ACF 5.9.0
Includes all local JSON fields.
{} Это метод класса: ACF_Local_JSON{}
Хуков нет.
Возвращает
null.
Использование
$ACF_Local_JSON = new ACF_Local_JSON(); $ACF_Local_JSON->include_fields();
Список изменений
С версии 5.9.0 | Введена. |
Код ACF_Local_JSON::include_fields() ACF Local JSON::include fields ACF 5.9.1
public function include_fields() {
// Bail early if disabled.
if( !$this->is_enabled() ) {
return false;
}
// Get load paths.
$files = $this->scan_field_groups();
foreach( $files as $key => $file ) {
$json = json_decode( file_get_contents( $file ), true );
$json['local'] = 'json';
$json['local_file'] = $file;
acf_add_local_field_group( $json );
}
}