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:

  1. Importing just the necessary Bootstrap styles into your stylesheet and making them specific to only markup related to your plugin.
  2. Only load JS scripts from Bootstrap that you need and putting them in noConflict mode, which will keep them out of global namespace and remap them so that only your plugin will make use of that specific instance.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.