Last active
August 29, 2015 14:17
-
-
Save zachwills/e4f794fa69a1facdcada to your computer and use it in GitHub Desktop.
Fieldmanager autocomplete w/ datasource
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
$datasource_speakers = new Fieldmanager_Datasource_Post( array( | |
'query_args' => array( 'post_type' => array( 'speaker' ) ), | |
'use_ajax' => true | |
) ); | |
$fm = new Fieldmanager_Autocomplete( __( 'Speaker' ), array( | |
'name' => 'speakers', | |
'datasource' => $datasource_speakers, | |
'sortable' => true, | |
'limit' => 0, | |
'add_more_label' => __( 'Add speaker' ), | |
) | |
); | |
$fm->add_meta_box( 'Speakers', array( 'page' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment