Created
April 23, 2019 16:16
-
-
Save frederikrosendahlkaa/b32c02bcbe71a7c7f44027f8cfd0f0bd to your computer and use it in GitHub Desktop.
ACF-VC Integrator - Add support for Star rating field ( https://github.com/kevinruscoe/acf-star-rating-field )
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
<?php | |
add_filter( 'acf_vc_add_on_fields', 'acfvc_add_addon_star_rating_field', 10, 3 ); | |
function acfvc_add_addon_star_rating_field ( $field, $args, $post_id ) { | |
if ( is_array( $field ) ) { | |
if ( $field["type"] == "star_rating_field" ) { | |
if ( !empty( $field["value"] ) ) { | |
return $field["value"]; | |
} | |
} | |
} | |
return $field; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment