When adding pages to the WordPress admin you use add_menu_page, which accepts a callable function/method. My issue is, I’m a little stumped on how to pass an argument to bar when it accepts/expects parameters, for example: I’ve tried a couple different approaches but I can’t seem to get it to work: So looking at line 287 of that file, it’s
Tag: call-user-func-array
Return an array from mysqli stmt query
I’m trying to convert a site to use prepared mysql statements, however I’m having some trouble replacing my use of fetch_array(). The comments on php.net offer a solution which I would have thought should work but for some reason I’m getting strange undefined constant errors when calling a function via call_user_func_array() can someone suggest a better way of doing it?