Created
March 19, 2019 18:56
-
-
Save hwkdev/13d994aff6a583635bd9d3f6c0ecd42a to your computer and use it in GitHub Desktop.
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/pre_load_reference', 'hwk_bypass_get_field_ref', 10, 3); | |
function hwk_bypass_get_field_ref($return, $field_name, $post_id){ | |
if(is_int($post_id)) | |
$return = acf_get_field($field_name, $post_id); | |
return $return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment