Show filters

PHP Libraries

10th March 2014

As this theme is starting to do some pretty big things it’s including more libraries. That’s okay though, for the amount of libraries we’ve included such as: Facebook, Twitter, Campaign Monitor etc. It’s still holding up well.

What it’s currently doing is including the classes on every page load, so far I’ve not observed a big enough increase in memory or load time  to have to act on it.

If this becomes a problem the solution would be to  NOT include these libraries as standard and to define a constant to turn libraries on as they’re needed, this means that each page would be able to decide to include a library or not. So where a twitter feed could globally be in the footer and therefore need to always be on, the same would not be true of the campaign monitor library and so you could call it on a page with a signup form by setting CAMPAIGN_MONITOR_LIB to true.

But like I said, it’s not a problem now to warrant a solution like that.