Skip to content

Instantly share code, notes, and snippets.

@badabingbreda
Created May 16, 2018 11:00
Show Gist options
  • Save badabingbreda/79570f7c356cd09d338e795b1a3aab47 to your computer and use it in GitHub Desktop.
Save badabingbreda/79570f7c356cd09d338e795b1a3aab47 to your computer and use it in GitHub Desktop.
Toolbox Example - var_dump a filter result or variable
<?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