Carrington Build Documentation

Module Filters

Modify a Module’s Class Name(s)

cfct-build-module-class: By default a module’s wrapper div is output with 2 class names, `cfct-module` and the `$id_base` of the module. Use this filter to modify the wrapper div’s class output on a per-module basis. Each individual module in a layout will fire this filter on front end output.

Modify a Module’s HTML Output

cfct-module-{$module-id}-html: Each individual module’s HTML output can be filtered here. This is the last filter available before the Module is rendered in the page and consists of all pre-rendered HTML.

Modify a Module’s View File

cfct-module-{$module_id}-view: Override the module’s `view.php` file. Provide a full file path to a view file to load. See “The View File” section of the Creating Modules documentation for more details on this filter.

Modify a Module’s Admin Form HTML Output

cfct-module-{$module_id}-admin-form: Each module’s Admin Form HTML can be filtered here. This is the last filter available before a module’s Admin Form is wrapped in the Module Edit HTML.

cfct-module-{$module_id}-admin: Modify the complete Module Edit screen HTML before it is sent back over Ajax.

Modify the Module’s Text output

cfct-module-{$module_id}-text: Modules should return a plain text representation of their data to be inserted in to the post_content for search and accessibility purposes (WordPress will still make excerpts from the post_content). This filter allows access to the plain text representation of a module before it is saved in to the post_content. By default, too, the Admin text is pulled from this as well.

Modify a Module’s Icon File URL

cfct-{$module_id}-module-icon: Each module, whether it supplies an icon or uses the default icon, is asked for the url to its icon when the admin screen is rendered. Use this filter to change the URL to the icon to customize a module’s icon.

Modify a Module’s Data When Saved

cfct-module-{$module_id}-update: Use this filter to inspect or modify a specific module’s save data before that data is saved.

Modify a Module’s URL or Filesystem Path

cfct-module-{$module_id}-url/cfct-module-{$module_id}-path: The base module class provides helper methods of `get_url()` and `get_path()` to assist modules that need to load or enqueue additional resources (like javascript or images). This filter allows access to that url to override or customize those resources without modifying to module itself. The module has already been constructed by the time this gets run.

cfct-build-module-url: Alter the module’s URL at module load time. This gets run at module construct.

cfct-build-module-url-unknown: If for some reason the URL to the module cannot be determined it will be passed through this filter before it is recorded by build.

cfct-build-module-urls: Carrington Build keeps a list of module URLs that from which the modules can pull their URL. Use this filter to modify the list as a while. This is run after `cfct-build-module-url` & `cfct-build-module-url-unknown`.

See also:

Back to Carrington Build

These sections are available to the public. The remaining sections are available exclusively to customers.