PHP code example of wpscholar / flex-fields

1. Go to this page and download the library: Download wpscholar/flex-fields library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wpscholar / flex-fields example snippets




register_flex_field(
  'email_address',                      // The field name
  [                                     // The field arguments
    'field' => 'input',  
    'type' => 'email',
    'value' => '[email protected]',
  ],
  'default'                             // The group name, defaults to 'default'
);



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