Skip to content

About the ACF Configuration

KJ Roelke edited this page Apr 18, 2024 · 3 revisions

ACF

This plugin assumes the use of ACF.

/inc/acf/json-files

This folder stores the import-able ACF JSON for extra fields (instead of defining them in the codebase). You will have to disable $this->init_acf(); in inc/plugin-logic/class-post-type-builder constructor function.

/inc/plugin-logic/cno-choctaw-news-custom-fields.php

Inits ACF fields and classes with php.

Classes (/inc/acf/classes)

The Classes escape all user-submitted input and provide a consisten, WordPress-like API (with familiar function naming conventions like get_the_photo and the_photo to return or echo, respectively).

Some of these functions are wrappers for existing WP functions: this is by design

Dev Note: (since v1.0)

The ACF_Image class is loaded, but is as-of-yet unused. May be used in future versions (if/where "Featured Image" is not used). If your project also uses this class, you should wrap the class initialization in a conditional:

if ( ! class_exists( 'ACF_Image' ) ) {
	// require_once the path to the `ACF_Image` class
}

This will prevent the class from being loaded twice (and throwing an error).

Clone this wiki locally