Last active
August 29, 2015 14:19
-
-
Save mboynes/1d800788e7578cbb923d to your computer and use it in GitHub Desktop.
Demo for fieldmanager.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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