wpscholar / flex-fields

A library for working with fields in WordPress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flex Fields

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

About

A library for working with fields in WordPress

License:GNU General Public License v3.0


Languages

Language:JavaScript 80.8%Language:PHP 18.0%Language:SCSS 1.2%