wpscholar/flex-fields

A library for working with fields in WordPress

Installs: 311

Dependents: 1

Suggesters: 0

Security: 0

Stars: 10

Watchers: 2

Forks: 2

Open Issues: 4

Language:JavaScript

1.7.6 2021-09-07 21:09 UTC

README

A library for working with fields in WordPress.

Installation

  • Run composer require wpscholar/flex-fields
  • Make sure you require the vendor/autoload.php file in your project.

Usage

Register a field

<?php

register_flex_field(
  'email_address',                      // The field name
  [                                     // The field arguments
    'field' => 'input',  
    'type' => 'email',
    'value' => 'john.doe@gmail.com',
  ],
  'default'                             // The group name, defaults to 'default'
);

Render a field

<?php

render_flex_field(
  'email_address',  // Field name 
  'default'         // The group name, defaults to 'default'
);

Maintainers

Micah Wood

Contributors

This project exists thanks to all the people who contribute.

project contributors