Closed JoshuaDoshua closed 2 years ago
Alternatively, we could just check ABSPATH
at the start of the files like most plugins do
Thanks for the issue.
This library is meant to be used in the context of a WordPress theme/plugin and as such the WordPress functions should be available?
It would be good to get a better idea of the context you're using PostTypes in and how this issue caused before moving forward with a solution.
Thanks!
Closing as I do not see a need for this when the library is intended to be used within a WP environment.
Thanks!
When using composer's autoloader, it fails because any WordPress function isn't found. I'd like to add
function_exists
checks to any method that includes a WordPress functions to resolve this issue.NOTE: In my case, I'm also autoloading files that call PostTypes registrations. But there shouldn't be any harm in adding these checks.