Closed webstractions closed 8 years ago
Hi,
I've uploaded an example here. You can simply download and install it as a plugin.
Hope it helps.
Thanks Michael. Helped immensely. I was trying to use the class name as part of the method name within the class to avoid having to add the action or filter. Guess that is not possible, but no worries. Thought I was missing something in my train of thought. Thanks again.
I see. For the dynamically generated functions for hooks, you need to replace \
with _
. If your class name is like Foo\Bar\MyClass
then the function name used in the class should be Foo_Bar_MyClass
.
I am trying to wrap my head around using Namespaced classes in callback hook functions that use {instantiated class name} as part of the function name.
Namespaced classes use '/' and not underscores. I am having a problem figuring out how to add actions and filters.