Using front-end AJAX requests in your WordPress plugins

Although it is fairly uncommon to be adding AJAX functionality to your WordPress plugins, it can be necessary for it to be added. Luckily it is quite easy and straight forward to integrate the required components as and when they are required.

To help explain how this can be achieved, we will be creating a plugin called “Ajax Example“, stored in the folder “ajax-example” inside the plugin directory of your WordPress install.

Continue reading “Using front-end AJAX requests in your WordPress plugins”

Forcing a WordPress plugin to be loaded before all other plugins

When you activate a plugin via the WordPress admin panel it calls the action hook “activated_plugin“, which updates the “active_plugins” site option stored in the database to determine which plugins your site should load.

The option value is a serialized array of the active plugins saved in alphabetical order according to the plugin directory and file name, for example:

Continue reading “Forcing a WordPress plugin to be loaded before all other plugins”