You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We received the following feedback from the WordPress Plugin Review Team about a plugin that ships Action Scheduler library.
## Determine files and directories locations correctly
WordPress provides several functions for easily determining where a given file or directory lives.
We detected that the way your plugin references some files, directories and/or URLs may not work with all WordPress setups. This happens because there are hardcoded references or you are using the WordPress internal constants.
Let's improve it, please check out the following documentation:
It contains all the functions available to determine locations correctly.
Most common cases in plugins can be solved using the following functions:
For where your plugin is located: plugin_dir_path() , plugin_dir_url() , plugins_url()
For the uploads directory: wp_upload_dir() (Note: If you need to write files, please do so in a folder in the uploads directory, not in your plugin directories).
ℹ️ In order to determine your plugin location, you would need to use the FILE variable for this to work properly. Note that this variable depends on the location of the file making the call. As this can create confusion, a common practice is to save its value in a define() in the main file of your plugin so that you don't have to worry about this.
We received the following feedback from the WordPress Plugin Review Team about a plugin that ships Action Scheduler library.
Previously reported similar issues:
The text was updated successfully, but these errors were encountered: