##Use Twitter Bootstrap in your WordPress plugins
To use the toolkit with your plugin:
images folders from our
bootstrap folder into your plugin directory.
Register the css and js files in your plugin
wp_register_style('boostrap_css', plugins_url('css/bootstrap.css', __FILE__)); wp_register_style('bootstrap_responsive_css', plugins_url('css/bootstrap-responsive.css', __FILE__)); wp_register_script('bootstrap_js', plugins_url('js/bootstrap.js', __FILE__));
Then, enqueue these files any time your UI depends on them:
wp_enqueue_style('bootstrap_css'); wp_enqueue_style('boosttrap_responsive_css'); wp_enqueue_script('bootstrap_js');
Wrap the UI you want to style with Twitter Bootstrap in a namespaced container, e.g.,
<div class="wp_bootstrap"> <!-- Twitter Bootstrap styles are applied here --> </div>
##How did we do this?
With the power of less. Twitter Bootstrap makes use of less in its stylesheets. We simply prefixed Twitter's styles with
##Build bootstrap for WordPress
We have included a makefile with convenience methods for working with the Bootstrap library.
makeRuns the LESS compiler to rebuild the
/lessfiles and compiles the docs pages. Requires lessc and uglify-js. Read more in Twitter's docs.
make watchThis is a convenience method for watching just Less files and automatically building them whenever you save. Requires the Watchr gem.
##About the Developers