Saturday, January 28, 2023
HomeWordPress DevelopmentPlugin submission denied for "Calling file places poorly" when utilizing WP_PLUGIN_DIR fixed

Plugin submission denied for “Calling file places poorly” when utilizing WP_PLUGIN_DIR fixed


I’ve submitted a plugin for assessment and it was not accepted for the next motive:

Calling file places poorly

The best way your plugin is referencing different information just isn’t going to work with all setups of WordPress.

Whenever you hardcode in paths like wp-content or your plugin folder identify, or assume that everybody has WordPress within the root of their area, you trigger anybody utilizing ‘Giving WordPress it is personal listing’ (a VERY widespread setup) to interrupt. As well as, WordPress permits customers to alter the identify of wp-content, so you’ll break anybody who chooses to take action.

Please assessment the next hyperlink and replace your plugin accordingly. And don’t be concerned about supporting WordPress 2.x or decrease. We do not encourage it nor count on you to take action, so save your self a while and vitality.

Keep in mind to utilize the FILE variable, so as than your plugin perform correctly in the actual world.

Instance(s) out of your plugin:

require_once WP_PLUGIN_DIR.'/pluginname/inc/features/single-post-ajax-callback.php';
require_once WP_PLUGIN_DIR.'/pluginname/inc/features/generate-images-ajax-callback.php';
require_once WP_PLUGIN_DIR.'/pluginname/inc/features/add-image-to-library-ajax-callback.php';

I do not perceive why this is not acceptable since I am not hardcoding the ‘wp-content’ path, and I am utilizing the WP_PLUGIN_DIR fixed.

Thanks upfront.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments