I've developed One new wordpress plugin, using Latest Bootstrap (4) and latest FontAwesome (5) version. Is now looking good. All design is complete. Now When I install this plug-in with another website. Which website theme using old bootstrap (3) version and old fontawesome version. Then my design or existing theme design will be broken, It's version conflict 3 and 4. So How can I resolve this issue? How can I load this bootstrap 4 only for my plugin? Or how can I avoid 3 or 4 version conflict? Please suggest me.
closed as off-topic by Krzysiek Dróżdż♦, Nathan Johnson, Jacob Peattie, Howdy_McGee♦ Feb 22 at 5:42
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Howdy_McGee
- "Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers' support routes." – Krzysiek Dróżdż, Nathan Johnson, Jacob Peattie
Although this is possible, you really don't want to load multiple versions of libraries as it's going to make your site slow to load.
You could try and use Bootstrap with a pre-processor like SASS with mixins to target just your plugin code and not the rest of the theme.
FontAwesome 4 and 5 seem to use different prefixes
fas- so you could load FA5 before FA4 as per this post.
Lastly, you could
Bootstrap is a framework that is theme driven. For that reason, it would probably be a good idea to bundle your custom template logic with your plugin.
Lets say you desire to have this new BS4 template bundled in your plugin, and you want users to use it instead of their existing BS3 template. In regards to that relationship, here is one possible way to achieving this.