ACF_Local_JSON::include_post_types
Includes all local JSON post types.
Метод класса: ACF_Local_JSON{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ACF_Local_JSON = new ACF_Local_JSON(); $ACF_Local_JSON->include_post_types();
Список изменений
С версии 6.1 | Введена. |
Код ACF_Local_JSON::include_post_types() ACF Local JSON::include post types ACF 6.4.2
public function include_post_types() { // Bail early if disabled. if ( ! $this->is_enabled() ) { return false; } // Get load paths. $files = $this->scan_files( 'acf-post-type' ); foreach ( $files as $key => $file ) { $json = json_decode( file_get_contents( $file ), true ); $json['local'] = 'json'; $json['local_file'] = $file; acf_add_local_internal_post_type( $json, 'acf-post-type' ); } }