Carrington Build Documentation

Important Changes to Carrington Build Module Registration

$id passed during module registration has been deprecated


Since the $id passed during module registration was only done so for internal housekeeping the requirement of the variable has been deprecated. It is now only required to pass the module, row, & module-extra registration functions the classname of the item being registered.

The registration methods will throw a WordPress _deprecated_argument warning if used with the old $id structure and will internally fix the arguments so that registration of the items succeeds.

NOTICE: The next major version of Build, probably version 1.1.1, will remove these deprecated notices and internal fixes and item registration will fail.

Old and Busted

cfct_build_register_module('my-module-id', 'my_module_classname');
cfct_build_register_row('my-row-id', 'my_row_class');
cfct_build_register_extra('my-module-extra', 'my_module_extra_class');

New Hotness



Build can automatically account for this change and load in the legacy data with just a slight tweak to your modules and rows. Modules and rows should be updated to include a member named $_deprecated_id that is the old registration id. This allows the legacy data stored in the database to be recognized and continue to function under the new registration setup.

class my_custom_module extends cfct_build_module {
    protected $_deprecated_id = 'my-custom-module-id'; // deprecated property, legacy id for modules that have been used under the old registration scheme

    // ...

class my_custom_row extends cfct_build_row {
    protected $_deprecated_id = 'my-custom-row'; // deprecated property, legacy id for modules that have been used under the old registration scheme

    // ...


All of Carrington Build’s internal modules have been updated to this new scheme.

Updates to Filter Names for Consistency

Filters and actions were changed in version 1.1 so that all consistently use dashes instead of underscores. The following filters and actions were updated (Old names are listed):

  • cfct_build_enabled_post_types → cfct-build-enabled-post-types
  • cfct_admin_pre_build → cfct-admin-pre-build
  • cfct_admin_post_build → cfct-admin-post-build
  • cfct_build_pre_build → cfct-build-pre-build
  • cfct_build_post_build → cfct-build-post-build
  • cfct_build_content → cfct-build-content
  • cfct_build_css → cfct-build-css
  • cfct_build_js → cfct-build-js
  • cfct_build_postmeta_key → cfct-build-postmeta-key
  • cfct_build_module_url_unknown → cfct-build-module-url-unknown
  • cfct_build_module_url → cfct-build-module-url
  • cfct_build_module_urls → cfct-build-module-urls
  • cfct_build_included_modules → cfct-build-included-modules
  • cfct_build_included_module_options → cfct-build-included-module-options
  • cfct_build_included_rows → cfct-build-included-rows
  • cfct_row_defaults → cfct-row-defaults
  • cfct_module_divider_css_classes → cfct-module-divider-css-classes
  • cfct_module_heading_h_tags → cfct-module-heading-h-tags
  • cfct_module_{$module_id}_admin_form → cfct-module-{$module_id}-admin-form
  • cfct_module_{$module_id}_admin → cfct-module-{$module_id}-admin
  • cfct_module_{$module_id}_text → cfct-module-{$module_id}-text
  • cfct_module_{$module_id}_display → cfct-module-{$module_id}-display
  • cfct_module_{$module_id}_html → cfct-module-{$module_id}-html
  • cfct_module_{$module_id}_update → cfct-module-{$module_id}-update
  • cfct_module_{$module_id}_url → cfct-module-{$module_id}-url
  • cfct_module_{$module_id}_path → cfct-module-{$module_id}-path
  • pre_cfct_build → pre-cfct-build
  • cfct_admin_pre_build → cfct-admin-pre-build
  • cfct_admin_post_build → cfct-admin-post-build

Fixed general consistency errors

  • cfct-module-{$moduleid}module-icon (added dash after moduleid)

See also:

Back to Carrington Build

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