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 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.