Make WordPress Core


Ignore:
Timestamp:
11/19/2009 08:45:37 PM (15 years ago)
Author:
westi
Message:

Reduce the size of the data returned by get_themes() by ~30% by reducing duplication.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r12216 r12226  
    366366        }
    367367
     368        //Make unique and remove duplicates when stylesheet and template are the same i.e. most themes
     369        $template_files = array_unique($template_files);
     370        $stylesheet_files = array_unique($stylesheet_files);
     371               
    368372        $template_dir = dirname($template_files[0]);
    369373        $stylesheet_dir = dirname($stylesheet_files[0]);
     
    596600            @closedir( $theme_dir );
    597601    }
    598 
    599602    return $theme_files;
    600603}
Note: See TracChangeset for help on using the changeset viewer.