function defined in functions.php not callable from snippet code
-
Hi,
I defined a function foo inside wp-content/themes/mytheme/functions.php, say it looks like this:
function foo($msg = ”) { … error_log( $msg ); …. }
Then I created a snippet to call it, ended up with a undefined function error.
In the mean time, I have a custom class defined in functions.php too:
MyClass { public static MYCONSTANT = ….. }
The snippent can access MyClass::MYCONSTANT with no problem.
Why?
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘function defined in functions.php not callable from snippet code’ is closed to new replies.