[wp-hackers] best way to check for bootstrap

Madalin Ignisca madalin.ignisca at gmail.com
Wed Feb 26 22:33:31 UTC 2014


that's right.

what's the plugin that alter's gravity forms? I'm interested a bit in as I
was using bootstrap's mixens on default gravity classes until now.


On Wed, Feb 26, 2014 at 10:34 PM, Chris McCoy <chris at lod.com> wrote:

> Ya for example, I looked at “the-bootstrap” on the themes directory on
> wordpress.org
>
> The handler used is tw-bootstrap
>
> And for example strap press from bragthemes uses bootstrap-styles and
> bootstrap-scripts for the bootstrap .css and .js
>
> Probably the best way is to use an option
>
> On 2014-02-26, 2:14 PM, "Madalin Ignisca" <madalin.ignisca at gmail.com>
> wrote:
>
> >That's nice to find out of a plugin that alters gravity forms output
> >optimized for Bootstrap.
> >
> >You could create an options page with a simple question: load bootstrap or
> >not?
> >
> >Let the user choose.
> >
> >I found the slug for bootstrap named in dozens of ways by theme authors
> >and
> >you can't keep up with them as nobody respects a standard like use
> >something like "bootstrap" and "bootstrap-component". If everybody would
> >do
> >that, we would have a better world :D
> >
> >I think that leaving the option to the user to disable loading bootstrap
> >from your plugin is the best way, so play with conditions ;)
> >
> >
> >On Wed, Feb 26, 2014 at 9:01 PM, Chris McCoy <chris at lod.com> wrote:
> >
> >> Reason I ask, is my plugin makes gravityforms into bootstrap, and I
> >>don’t
> >> want to load the bootstrap css and js if its already loaded.
> >>
> >> I know I could add an admin_notices saying bootstrap css/js required,
> >>etc.
> >>
> >>
> >>
> >> On 2014-02-26, 1:59 PM, "Madalin Ignisca" <madalin.ignisca at gmail.com>
> >> wrote:
> >>
> >> >Bootstrap from getbootstrap.com is a frontend framework that should be
> >> >available normally only on theme level.
> >> >
> >> >If you're building a theme with Bootstrap, you should not worry that it
> >> >would be loaded by something else as it should not (if you find a
> >>plugin
> >> >that does it, well, the plugin author doesn't likes some good practices
> >> >and
> >> >standards).
> >> >
> >> >The theme is the presentation layer and the top layer of WordPress and
> >> >only
> >> >it should handle this kinds of libraries.
> >> >
> >> >It shouldn't be included in the core as there are dozens of
> >>alternatives
> >> >and Bootstrap isn't a standard, it's just popular; there are others
> >>better
> >> >done with more features then Bootstrap (well, maybe just my opinion).
> >> >
> >> >
> >> >On Wed, Feb 26, 2014 at 8:52 PM, Nikola Nikolov
> >> ><nikolov.tmw at gmail.com>wrote:
> >> >
> >> >> The best approach in my opinion is to use "bootstrap" as it's handle
> >>in
> >> >> wp_register/enqueue_style - after all you shouldn't really need
> >> >>different
> >> >> version of bootstrap(or multiple instance of bootstrap) on the same
> >> >>page.
> >> >>
> >> >> Of course you can probably hook late to wp_enqueue_scripts and go
> >> >>through
> >> >> all of the enqueued styles and see if there's anything that contains
> >> >> bootstrap. Obviously that's an overkill and will not always work.
> >> >>
> >> >>
> >> >> On Wed, Feb 26, 2014 at 8:31 PM, Chris McCoy <chris at lod.com> wrote:
> >> >>
> >> >> > What would be the best way to check if bootstrap is added (enqueue)
> >> >>so I
> >> >> > don¹t load it twice.
> >> >> >
> >> >> > Also any plans on adding bootstrap to core shipped scripts?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > _______________________________________________
> >> >> > wp-hackers mailing list
> >> >> > wp-hackers at lists.automattic.com
> >> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> >> >
> >> >> _______________________________________________
> >> >> wp-hackers mailing list
> >> >> wp-hackers at lists.automattic.com
> >> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> >>
> >> >
> >> >
> >> >
> >> >--
> >> >*Madalin Ignisca*
> >> >*web developer*
> >> >http://imadalin.ro/
> >> >_______________________________________________
> >> >wp-hackers mailing list
> >> >wp-hackers at lists.automattic.com
> >> >http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >>
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> >
> >
> >--
> >*Madalin Ignisca*
> >*web developer*
> >http://imadalin.ro/
> >_______________________________________________
> >wp-hackers mailing list
> >wp-hackers at lists.automattic.com
> >http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
*Madalin Ignisca*
*web developer*
http://imadalin.ro/


More information about the wp-hackers mailing list