Title: wrapper function pass through params
Last modified: February 16, 2017

---

# wrapper function pass through params

 *  Resolved [bscandanavia](https://wordpress.org/support/users/bscandanavia/)
 * (@bscandanavia)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wrapper-function-pass-through-params/)
 * Hello,
 * I’ve wrapped my d() calls in a wrapper debug function that, amongst other things,
   checks to make sure this plugin is installed (and to not throw errors when d()
   is not available on different staging/production setups, etc).
 * The fallout of this is that Kint then lists the parameter names of my wrapper
   function. for example:
 *     ```
       debug($var, $var2){
         if(function_exists('d'){
           d($var, $var2);
         }
       }
   
       $test = 'foo';
       $test2 = 'bar;
       d($test, $test2);
       ```
   
 * will create a kint output with $var $var2 as the source vars rather $test and
   $test2. Is there anyway to pass through the original variable names?
 * I realize this is more of a question about Kint itself, but thought worth asking
   here.
 * thank you,
    Erik

Viewing 1 replies (of 1 total)

 *  anonymized-13171256
 * (@anonymized-13171256)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/wrapper-function-pass-through-params/#post-8813197)
 * Hi Erik,
 * I am not aware of an easy way. PHP has a thing called Reflection but it’s above
   my paygrade. 😀
    [http://php.net/manual/en/reflectionparameter.getname.php](http://php.net/manual/en/reflectionparameter.getname.php)
 * A simple solution is to create a fallback. For example, an mu-plugin with
 *     ```
       function the_last_word() {
       	if ( !function_exists( 'd' ) ) {
       		function d() {}
       	}
       }
       add_action( 'wp', 'the_last_word' );
       ```
   
 * may be easier to remember to do than removing all your d() calls.

Viewing 1 replies (of 1 total)

The topic ‘wrapper function pass through params’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kint-debugger_badbec.svg)
 * [Kint Debugger](https://wordpress.org/plugins/kint-debugger/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kint-debugger/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kint-debugger/)
 * [Active Topics](https://wordpress.org/support/plugin/kint-debugger/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kint-debugger/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kint-debugger/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: anonymized-13171256
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/wrapper-function-pass-through-params/#post-8813197)
 * Status: resolved