Skip to content

Instantly share code, notes, and snippets.

@hawkidoki
Last active January 4, 2018 22:51
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 hawkidoki/dcffbb3acccc3f5a5e9c4d9d773b18d4 to your computer and use it in GitHub Desktop.
Save hawkidoki/dcffbb3acccc3f5a5e9c4d9d773b18d4 to your computer and use it in GitHub Desktop.
<?php
add_action('acf/render_field_group_settings', 'hwk_acf_field_groups_add_settings_fa', 10);
function hwk_acf_field_groups_add_settings_fa($group){
// Font Awesome
// Return: "hwk_fontawesome": "fa-500px"
acf_render_field_wrap(array(
'label' => __('Font Awesome','acf'),
'instructions' => __('Instructions','acf'),
'type' => 'font-awesome',
'name' => 'hwk_fontawesome',
'prefix' => 'acf_field_group',
'value' => (isset($group['hwk_fontawesome'])) ? $group['hwk_fontawesome'] : '',
'allow_null' => true, // true | false
'show_preview' => false // true | false
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment