Mlix / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Custom css include version #482

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If using nggallery.css at theme_root directory it's always include with '1.0.0' 
version.

<link rel='stylesheet' id='NextGEN-css'  
href='/wp-content/themes/mytheme/nggallery.css?ver=1.0.0' type='text/css' 
media='screen' />

So it cached by browser. And if I add some changes in nggallery.css, version 
don't change and users see old version.

Can you make version took from nggallery.css manifest or for the first 
configured from functions.php?

For example:
(nggallery.php str:391)
function load_styles() {
  // check first the theme folder for a nggallery.css
  if ( nggGallery::get_theme_css_file() )
    wp_enqueue_style('NextGEN', nggGallery::get_theme_css_file() , false, '1.0.0', 'screen');
  ...

change to

function load_styles() {
  // check first the theme folder for a nggallery.css
  if ( nggGallery::get_theme_css_file() )
    $custom_ver = defined('NG_CSS_VER') ? NG_CSS_VER : '1.0.0';
    wp_enqueue_style('NextGEN', nggGallery::get_theme_css_file() , false, $custom_ver, 'screen');

Original issue reported on code.google.com by exreanim...@gmail.com on 12 Mar 2012 at 9:19