Created
December 22, 2016 19:41
-
-
Save badabingbreda/7fd4b22e429f18ac1062cfc0da26f2f3 to your computer and use it in GitHub Desktop.
ACF Template Builder - Return custom field-type output
This file contains 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
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