When using ajax, SAM_URL and SAM_URL_IMG constants are not accesible because we're not loading sam.class.php. Also because of SHORTINIT some of WP functions are not accessible too, so we have to load some files expliciltly.
I set all the constants used by plugin_dir_url and also a global var $wp_plugin_paths should be set to prevent PHP warnings and notices.
When using ajax,
SAM_URL
andSAM_URL_IMG
constants are not accesible because we're not loadingsam.class.php
. Also because ofSHORTINIT
some of WP functions are not accessible too, so we have to load some files expliciltly.I set all the constants used by
plugin_dir_url
and also a global var$wp_plugin_paths
should be set to prevent PHP warnings and notices.