Created
May 16, 2018 11:00
-
-
Save badabingbreda/79570f7c356cd09d338e795b1a3aab47 to your computer and use it in GitHub Desktop.
Toolbox Example - var_dump a filter result or variable
This file contains hidden or 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, make sure the priority is at the right position | |
add_filter( 'toolbox/helpers/get_acf_field/type=repeater' , 'do_var_dump' , 15 , 5 ); | |
// Use this function to dump out the value to determine what you might need | |
function do_var_dump( $string, $field_object , $value , $atts, $postid ) { | |
ob_start(); | |
var_dump( $string ); // $string | $field_object | $value | $atts | $postid | |
return ob_get_clean(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment