Skip to content

Instantly share code, notes, and snippets.

@badabingbreda
Created December 22, 2016 19:41
Show Gist options
  • Save badabingbreda/7fd4b22e429f18ac1062cfc0da26f2f3 to your computer and use it in GitHub Desktop.
Save badabingbreda/7fd4b22e429f18ac1062cfc0da26f2f3 to your computer and use it in GitHub Desktop.
ACF Template Builder - Return custom field-type output
add_filter( 'bbacf/helpers/get_acf_field/type=font-awesome' , 'return_custom_acf_fontawesome' , 10, 5 );
/**
* return rotated font-awesome icon
* @param [type] $string [description]
* @param [type] $field_object [description]
* @param [type] $value [description]
* @param [type] $atts [description]
* @param [type] $postid [description]
* @return [type] [description]
*/
function return_custom_acf_fontawesome( $string , $field_object , $value , $atts = null , $postid = null ) {
return '<i class="fa '.$value.' fa-lg fa-rotate-90"></i>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment