[geeklog-devel] Scripts Class Updates and Caching CSS questions

Tom websitemaster at cogeco.net
Mon Jul 22 22:01:55 EDT 2013


FYI, I completed this feature request:
http://project.geeklog.net/tracking/view.php?id=1459

 

jQuery can now be set in the header (it is the footer by default). If you
set any part of the library to the header (jquery or ui) the entire library
set to be loaded, will be loaded in the header (including common.js). I saw
no point in offering any finer control here.

 

I also added priority loading for CSS and JavaScript Files. The default
priority is 100 and it is loaded in ASC order. I also enabled the name
attribute for the css file. If the name is 'theme' it will always be loaded
first regardless of what it's priority is.

 

See the modern curve theme functions.php for an example (all other themes
are updated as well).

 

I will be working on next building into the Scripts class  caching for the
css files (like how the modern curve theme handles it).  Plugins will be
allowed to add their css files as well as long as $constant is set to true
when they pass their css file info to the scripts class.

 

I guess I will also add a function to wipe the theme_etag.cache file when
the cache is cleared by Geeklog.

 

The only hiccup I see is how we handle language direction support. Modern
Curve does handle it but it is set at the time of the creation of the
modern_curve_etag.cache file. If the user changes language that has a
different direction then he is out of luck.  Not sure how to handle this or
for example denim which does it differently as well. I think we will need 2
theme_etag.cache files, 1 for ltr and 1 for rtl.

 

Is there anything else I should consider when caching css files?

 

Thanks

 

Tom

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20130722/1d1a8583/attachment.html>


More information about the geeklog-devel mailing list