Quantcast
Channel: admin — WordPress Plugins
Viewing all articles
Browse latest Browse all 2035

SetCron

$
0
0

Emailed Author: There are issues with your code

## Including your own CURL

You should look at our HTTP API instead: https://codex.wordpress.org/HTTP_API

## Calling files poorly

The way your plugin is referencing other files is not going to work with all setups of WordPress.

require_once ABSPATH . 'wp-content/plugins/setcron/libraries/setcron.php';

require_once ABSPATH.'wp-content/plugins/setcron/packages/anlutro/cURL/cURL.php';
require_once ABSPATH.'wp-content/plugins/setcron/packages/anlutro/cURL/Request.php';
require_once ABSPATH.'wp-content/plugins/setcron/packages/anlutro/cURL/Response.php';

and so on

When you hardcode in paths, or assume that everyone has WordPress in the root of their domain, you cause anyone using 'Giving WordPress it's own directory' (a VERY common setup) to break. In addition, WordPress allows users to change the name of wp-content, so you would break anyone who choses to do so.

Please review http://codex.wordpress.org/Determining_Plugin_and_Content_Directories and update your plugin accordingly. And don't worry about supporting WordPress 2.x or lower. We don't encourage it nor expect you to do so, so save yourself some time and energy.

When you've corrected your code, reply to this email with the updated code attached as a zip, or provide a link to the new code for us to review.


Viewing all articles
Browse latest Browse all 2035

Trending Articles