DOCS

Developer Documentation

This section covers everything needed to extend, customize, or integrate with Fundations from code. It applies to the FREE plugin (version 2.8.x) unless a section is marked PRO.

Fundations uses standard WordPress hooks and filters for all extension points. No custom registration API is required: use add_action() and add_filter() as you would for any WordPress plugin.

What is in this section

  • Hooks & Filters Reference: All action hooks and filters exposed by the FREE plugin, with parameter signatures, source locations, and usage examples.
  • REST API & Meta Fields: The REST endpoints registered under get-fund/v1, the donation form AJAX endpoint, and the meta fields exposed via the WordPress REST API.
  • Custom Block Development: How to build Gutenberg blocks that register in the Fundations block category and read campaign data.
  • Code Examples: Practical, source-verified snippets for the most common customization tasks.
  • Contributing Guide: Setup, coding standards, build process, and workflow for contributing to the plugin.

Architecture overview

Fundations bootstraps from fundations.php, which defines constants and instantiates the main Get_Fund class. That class loads approximately 40 class files from includes/ and wires WordPress action and filter hooks through a Get_Fund_Loader collector. The loader runs all registered hooks when run() is called at the end of the bootstrap sequence.

Extension hooks (do_action and apply_filters) are called directly within each class at the relevant point. Developers do not need to interact with the loader: use add_action and add_filter at init priority 10 or later.

FREE vs PRO

The FREE plugin ships stub classes for features that PRO extends. PRO hooks into FREE through the same action and filter API documented here. When you read this documentation:

  • Hooks marked FREE are available without a PRO license.
  • Hooks marked PRO are registered by the fundations-pro plugin and only fire when a valid Appsero license is active.
  • Get_Fund::is_pro() returns true only when the Get_Fund_Pro class exists and Get_Fund_Pro::is_active() confirms the license is valid.

Never make code depend on PRO classes without guarding with class_exists('Get_Fund_Pro') or Get_Fund::is_pro().

Naming conventions

All internal identifiers use the legacy get_fund prefix, not fundations:

TypePrefixExample
PHP classGet_Fund_Get_Fund_Block_Editor
PHP fileclass-get-fund-class-get-fund-donation-form.php
Function / hook / option / metaget_fund_get_fund_donation_paid
ConstantGET_FUND_GET_FUND_VERSION
CSS class.get-fund-.get-fund-progress-bar
Block nameget-fund/get-fund/donation-form
Text domainfundations (FREE), fundations-pro (PRO)

The text domain is fundations, not get-fund. The old .copilot file in the repository uses get-fund as the text domain; that file is stale and should not be used as reference.