Ticket #11164: themesort.diff

File themesort.diff, 892 bytes (added by uglyrobot, 4 years ago)

Theme sort filters

  • wp-admin/themes.php

     
    6363unset($themes[$ct->name]); 
    6464 
    6565uksort( $themes, "strnatcasecmp" ); 
     66$themes = apply_filters('sort_all_themes', $themes); 
    6667$theme_total = count( $themes ); 
    6768$per_page = 15; 
    6869 
     
    173174 
    174175$theme_names = array_keys($themes); 
    175176natcasesort($theme_names); 
     177$theme_names = apply_filters('sort_paged_themes', $theme_names); 
    176178 
    177179$table = array(); 
    178180$rows = ceil(count($theme_names) / 3); 
     
    185187<tr> 
    186188<?php 
    187189foreach ( $cols as $col => $theme_name ) { 
    188         $class = array('available-theme'); 
     190        $class = array('available-theme', $themes[$theme_name]['Template']); 
    189191        if ( $row == 1 ) $class[] = 'top'; 
    190192        if ( $col == 1 ) $class[] = 'left'; 
    191193        if ( $row == $rows ) $class[] = 'bottom';