Skip to content

Repository files navigation

Fund Me

Tests

A tiny WordPress plugin that helps developers add a donation / sponsorship link to their WordPress site — for their own plugins and themes, and for any other plugin or theme that declares a Funding URI header.

What it does

WordPress core doesn't recognize a Funding URI header in plugin or theme files out of the box. Fund Me:

  1. Registers Funding URI as a recognized extra header for both plugins and themes (via the extra_plugin_headers and extra_theme_headers filters), so WordPress parses it out of the plugin/theme file header block instead of ignoring it.
  2. Adds a ❤️ Show support action link for any plugin or theme that declares a non-empty Funding URI, linking to that URL in a new tab:
    • for plugins, next to Deactivate on the Plugins screen (single-site and Multisite network admin);
    • for themes, only on the Multisite network-admin Themes list and the legacy "browse available themes" table — not on the standard single-site Appearance → Themes screen, which builds its own action links in PHP and never fires the theme_action_links filter this plugin hooks into.

If a plugin or theme has no Funding URI, nothing changes for it.

Declaring a Funding URI

Add a Funding URI header to your plugin or theme's main file (or style.css for themes):

/**
 * Plugin Name: My Plugin
 * Funding URI: https://github.com/sponsors/you
 */

Fund Me itself declares one, pointing at its own maintainer's GitHub Sponsors page.

Requirements

  • WordPress (admin-side only; no front-end behavior)
  • PHP 8.3+ for local development (see composer.json's config.platform.php)

Installation

  1. Download fund-me.zip from the Releases page.
  2. Upload and activate it like any other WordPress plugin.

Development

Install dependencies:

composer install

Run the test suite (requires svn and a local MySQL instance reachable with the credentials below — see .github/workflows/test.yml for the exact CI setup):

composer run-script ci-test

This scaffolds a WordPress test environment via WP-CLI (wp scaffold plugin-tests, bin/install-wp-tests.sh) against a wordpress database on localhost with user/password root/root, then runs PHPUnit. Tests live in tests/TestFundMe.php and cover all of the plugin's behavior described above.

Build a release zip locally:

composer run-script build

OpenSpec

This repo uses OpenSpec to plan and track behavior changes. See openspec/specs/ for the current capability specs and openspec/changes/ for changes in progress.

License

MPL-2.0

About

Wordpress plugin to help developers get funding.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages