A library for working with fields in WordPress.
- Run
composer require wpscholar/flex-fields
- Make sure you require the
vendor/autoload.php
file in your project.
<?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'
);
<?php
render_flex_field(
'email_address', // Field name
'default' // The group name, defaults to 'default'
);
This project exists thanks to all the people who contribute.