Last active
August 29, 2015 14:05
-
-
Save matthewpizza/a5c07d896dc6b522c69e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
add_action( 'init', function() { | |
$fieldmanager = new Fieldmanager_Group( array( | |
'name' => 'tc_faq_fields', | |
'limit' => 0, | |
'label' => 'New FAQ', | |
'label_macro' => array( 'FAQ: %s', 'question' ), | |
'add_more_label' => 'Add another FAQ', | |
'collapsible' => true, | |
'collapsed' => false, | |
'sortable' => true, | |
'children' => array( | |
'question' => new Fieldmanager_Textfield( 'Question' ), | |
'answer' => new Fieldmanager_TextArea( 'Answer' ), | |
), | |
) ); | |
$fieldmanager->add_meta_box( 'FAQ', array( 'faq' ) ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
✌️ https://github.com/alleyinteractive/wordpress-fieldmanager