I want to use twitter-bootstrap in my plugin. Are there any downsides of that? Will it create any issue if other plugin are already using the same on WordPress environment?
Yes, there are clearly challenges to using such a public dependency as Bootstrap, especially in a public plugin:
- version conflicts;
- styling conflicts;
- script conflicts.
To minimize possibility of conflict and breakage you would need to consider following extra steps:
- Importing just the necessary Bootstrap styles into your stylesheet and making them specific to only markup related to your plugin.
- Only load JS scripts from Bootstrap that you need and putting them in
noConflictmode, which will keep them out of global namespace and remap them so that only your plugin will make use of that specific instance.