Changeset 12477 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 03/17/2023 03:48:02 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r12475 r12477 568 568 if ( ! $assets ) { 569 569 return false; 570 } 571 572 // Sort them if needed, svg > png > jpg 573 if ( count( $assets ) > 1 ) { 574 uasort( $assets, function( $a, $b ) { 575 // Thankfully the extensions are alphabetical, so let's just sort by that. 576 $a_ext = strtolower( pathinfo( $a['filename'], PATHINFO_EXTENSION ) ); 577 $b_ext = strtolower( pathinfo( $b['filename'], PATHINFO_EXTENSION ) ); 578 579 return $b_ext <=> $a_ext; 580 } ); 570 581 } 571 582
Note: See TracChangeset
for help on using the changeset viewer.