ACF_Local_JSON::include_taxonomies
Includes all local JSON taxonomies.
Method of the class: ACF_Local_JSON{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Local_JSON = new ACF_Local_JSON(); $ACF_Local_JSON->include_taxonomies();
Changelog
| Since 6.1 | Introduced. |
ACF_Local_JSON::include_taxonomies() ACF Local JSON::include taxonomies code ACF 6.8.8
public function include_taxonomies() {
// Bail early if disabled.
if ( ! $this->is_enabled() ) {
return false;
}
// Get load paths.
$files = $this->scan_files( 'acf-taxonomy' );
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-taxonomy' );
}
}