Created
November 10, 2015 08:02
-
-
Save ville6000/af367dba71ab203337c2 to your computer and use it in GitHub Desktop.
Get select fields options from Types custom field
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 | |
$field_config = wpcf_admin_fields_get_field( 'field-id' ); | |
$field_options = array(); | |
if ( isset( $field_config['data']['options'] ) ) { | |
foreach ( $field_config['data']['options'] as $option ) { | |
if ( isset( $option['value'] ) ) { | |
$field_options[ $option['title'] ] = $option['value']; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment