Embedding Ultimate Fields into Custom Plugin
-
Hi Radoslav,
Thanks for the plugin. Can you tell me what is the correct way of embedding this plugin in my custom plugin.
I am using WordPress Plugin Boilerplate. So I placed your plugin inside “includes” folder and I loaded the plugin as below.
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/ultimate-fields/ultimate-fields.php';
This includes the plugin and everything works fine, but I don’t think the CSS, JS files and fonts, images are working fine.
Do I need to set any Constant to set the path for CSS, JS, fonts, images etc.,? Like setting UF_URL, UF_DIR help loading the css and js properly?
The url to CSS and JS are like this:
https://mailchimp.wp:8888/wp-content/plugins/ultimate-fields/templates/css/jquery-ui/jquery-ui.css
But the path should have been
https://mailchimp.wp:8888/wp-content/plugins/MY-PLUGIN-NAME/INCLUDES/ultimate-fields/templates/css/jquery-ui/jquery-ui.css
The same applies for js and other assets as well.
PS: Will this plugin be under constant development? I am planning to use this for all my future projects.
Thanks!
- The topic ‘Embedding Ultimate Fields into Custom Plugin’ is closed to new replies.