Closed traed closed 1 month ago
It's not an API, but you can follow the issue here: #3787
Says API right here: https://redirection.me/developer/php-api/
It also says 'It should be noted that this API is subject to change. Use at your own risk.'
Says API right here
But yeah, point taken. What I was trying to say is that it's not an official API that you can rely on to do things. It may change, and in this instance some functions are only loaded if you follow a certain route through the code - it wasn't designed as an 'API'.
When trying to use the PHP API to do Red_Item::create I get the error
Error: Class "Red_Group" not found
. The class Red_Item works though which leads me to believe Red_Item is always required but Red_Group is only required in some parts of the plugin but not others, even though Red_Item has depends on it.I guess the easy solution would be to require_once group.php from, in this case, Red_Item_Sanitize (since that is where it is used).