Embedding a plugin into a project (not a plugin)
AJAX Simply- Examples
- FAQ
- Embedding a plugin into a project (not a plugin)
- Migration from jQuery (v1.8)
In this case you will not receive automatic updates and this is the only downside...
To embed the plugin into the project you need to copy the plugin folder into the folder of your plugin, theme, or into the MU plugins folder. Wherever it needs to be, copy there.
Then simply include the main plugin file: ajax-simply.php into your project:
require_once 'path_to_plugin/ajax-simply.php';
Done!
If the plugin is embedded into a theme
You also need to open the file ajax-simply.php and redefine the constant AJAXS_URL. The result should look like this:
## for the plugin or MU plugin define( 'AJAXS_URL', plugin_dir_url(__FILE__) ); ## for the theme define( 'AJAXS_URL', strtr( AJAXS_PATH, array( wp_normalize_path(get_template_directory()) => get_template_directory_uri() ) ) );