Custom plugin route in WordPress

Okay so my question is quite simple. I need to implement some custom routing rules for my plugin. Those routes would only take one argument (so nothing complicated) and would look like : http://www.example.org/myroute/myargument And ideally, this would call a custom class, and display a custom template (that could directly access the class). What’s the … Read more

“Cannot create generic array of ..” – how to create an Array of Map?

Because of how generics in Java work, you cannot directly create an array of a generic type (such as Map<String, Object>[]). Instead, you create an array of the raw type (Map[]) and cast it to Map<String, Object>[]. This will cause an unavoidable (but suppressible) compiler warning. This should work for what you need: Map<String, Object>[] … Read more