Search by

forja-wp / forja-fields

oswa

Campos personalizados para WordPress definidos por código, con la interfaz de administración de ACF/SCF.

Package info

github.com/oswaldohuillca/forja-fields

pkg:composer/forja-wp/forja-fields

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.1 2026-09-29 22:47 UTC

This package is auto-updated.

Last update: 2026-09-29 22:51:45 UTC


README

English · Español

A Composer library for building WordPress custom fields from your theme's code, with the ACF/Secure Custom Fields admin interface your editors already know.

The idea is simple: CMB2's developer API, ACF's editing experience.

  • Not a plugin. It installs into the theme and there is nothing to activate.
  • No field-builder screen. Field groups are declared in PHP and live in the repository.
  • Visual parity with ACF/SCF: their markup and CSS are ported, not reinvented.
  • Compatible with ACF data: an existing site is read without migrating anything.
composer require forja-wp/forja-fields
add_action( 'forja/register_boxes', function () {
	forja_register_box( 'hero', array(
		'title'           => 'Hero content',
		'object_subtypes' => array( 'page' ),
		'fields'          => array(
			array( 'type' => 'text',  'name' => 'headline',   'label' => 'Headline' ),
			array( 'type' => 'image', 'name' => 'background', 'label' => 'Background image' ),
		),
	) );
} );
forja_the_field( 'headline' );

Documentation

The full documentation lives in docs/ and is published as a site:

bun run docs          # dev server, with live reload
bun run docs:build    # static site in docs/.vitepress/dist

The site defaults to English, with Spanish under /es/. The Spanish version is the complete, canonical one; the English one covers getting started.

Where What it covers
Installation Installing and wiring up the assets
Getting started Declaring your first field group
Fields The 35 field types
Reference (Spanish) Return values, conditional logic, validation and extending
Architecture (Spanish) The reasoning behind each decision, external dependencies and security
ROADMAP.md (Spanish) Status of each phase and decisions already made

Requirements

PHP 8.1 or newer
WordPress 6.4 or newer
Composer 2.x
Bun 1.3 or newer (only to work on the library itself)

License

GPL-2.0-or-later. Derivative work of Secure Custom Fields.