Adding support for custom content directory using the WordPress plugins_url() method.
I changed the defined global variable (AMD_ZLRECIPE_PLUGIN_DIRECTORY) to use plugins_url when building up the plugin directory path.
The WP site url (site_url()) is pulled in later in the zlrecipe.php file, set as a variable, and then used several times to build up the path to the wp-content directory. I followed a similar pattern of defining an additional variable for the plugins url ($pluginsurl), mostly because I didn't want to break anything. :-) You might be able to use the previously defined global variable instead, but not sure.
So this works for me when using my custom content directory. I didn't notice any issues in the Chrome dev tools and the basic functionality of the plugin looks like it's working. I haven't tried it out in an instance of WP using the default wp-content/plugins directory, so you may want to check that out.
If you have any questions or feedback, let me know. Glad to help!
Adding support for custom content directory using the WordPress plugins_url() method.
I changed the defined global variable (AMD_ZLRECIPE_PLUGIN_DIRECTORY) to use plugins_url when building up the plugin directory path.
The WP site url (site_url()) is pulled in later in the zlrecipe.php file, set as a variable, and then used several times to build up the path to the wp-content directory. I followed a similar pattern of defining an additional variable for the plugins url ($pluginsurl), mostly because I didn't want to break anything. :-) You might be able to use the previously defined global variable instead, but not sure.
So this works for me when using my custom content directory. I didn't notice any issues in the Chrome dev tools and the basic functionality of the plugin looks like it's working. I haven't tried it out in an instance of WP using the default wp-content/plugins directory, so you may want to check that out.
If you have any questions or feedback, let me know. Glad to help!