When I say 'test for file changes', I obviously say 'call filemdate on the file and compare it with $latest_date'... Should I re-explain everything again..?? :-/
Also -- my bad: script files take the current theme into account... The theme's folder name is included in the file ID.
The only 'way' I can see to quickly test whether we should check language file dates is...
if (filemtime($theme['theme_dir'] . '/languages/.') > $settings['latest_lang'])
('latest_lang' being an hypothetical variable where we store the most recent language file date.)
This could be done in Load.php at some point. If the language folder is updated, then we can either: (1) clean_cache('js') entirely (wanna say, *who minds*), (2) go through all files and test for their dates etc... (booooring!), (3) clean_cache('js') but only on files that use $txt strings in them. (A bit boring, too, especially since I'm going to be using $txt everywhere at that point...)
Two problems remain:
1/ should we store a latest_lang variable for each and every single language folder available to us..?
2/ how do we keep track of language files for plugins..?
Welcoming ideas, as always... :) Especially since this is probably the last remaining step before I can commit my work. (Which is already 3 times bigger than the original working code from a few days ago :P)
Posted: September 29th, 2012, 07:59 AM
Also -- my bad: script files take the current theme into account... The theme's folder name is included in the file ID.
Posted: September 29th, 2012, 11:22 AM
The only 'way' I can see to quickly test whether we should check language file dates is...
if (filemtime($theme['theme_dir'] . '/languages/.') > $settings['latest_lang'])
('latest_lang' being an hypothetical variable where we store the most recent language file date.)
This could be done in Load.php at some point. If the language folder is updated, then we can either: (1) clean_cache('js') entirely (wanna say, *who minds*), (2) go through all files and test for their dates etc... (booooring!), (3) clean_cache('js') but only on files that use $txt strings in them. (A bit boring, too, especially since I'm going to be using $txt everywhere at that point...)
Two problems remain:
1/ should we store a latest_lang variable for each and every single language folder available to us..?
2/ how do we keep track of language files for plugins..?
Welcoming ideas, as always... :) Especially since this is probably the last remaining step before I can commit my work. (Which is already 3 times bigger than the original working code from a few days ago :P)