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('acfvc_google_map','acfvc_google_map_custom_output',10,3); | |
function acfvc_google_map_custom_output ( $output, $field, $post_id ) { | |
return '<iframe width="100%" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q='.urlencode( $field["value"]["address"] ).'&hl=en;z=14&output=embed"></iframe>'; | |
} |
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"]; | |
} | |
} |
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('acfvc_text','acfvc_text_add_prepend_to_output',10,3); | |
function acfvc_text_add_prepend_to_output ( $output, $field, $post_id ) { | |
$new_output = "<span>".$field["prepend"]."</span> ".$output; | |
return $new_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
<?php | |
add_filter('acfvc_relationship','acfvc_relationship_hide_unpublished_posts',10,3); | |
function acfvc_relationship_hide_unpublished_posts ( $output, $field, $id ) { | |
$new_output = "<ul>"; | |
foreach ( $field["value"] as $key => $value ) { | |
if ( $value->post_status == "publish" ) { |