Skip to content

Instantly share code, notes, and snippets.

@mboynes
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mboynes/1d800788e7578cbb923d to your computer and use it in GitHub Desktop.
Save mboynes/1d800788e7578cbb923d to your computer and use it in GitHub Desktop.
Demo for fieldmanager.org
<?php
// put this in functions.php or an include file
add_action( 'fm_post_post', function() {
$fm = new Fieldmanager_Group( array(
'name' => 'contact_information',
'children' => array(
'name' => new Fieldmanager_Textfield( __( 'Name', 'your-domain' ) ),
'phone_number' => new Fieldmanager_Textfield( __( 'Phone Number', 'your-domain' ) ),
'website' => new Fieldmanager_Link( __( 'Website', 'your-domain' ) ),
),
) );
$fm->add_meta_box( __( 'Contact Information', 'your-domain' ), 'post' );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment