Feature request: sort custom sidebars by name
-
On sites with a large number of custom sidebars, it can be hard to find the sidebar you wish to edit. It would be helpful if they were sorted by name (like theme sidebars are). This could be done automatically in
getCustomSidebars()
or with a filter so themes could sort by other fields. This code works in WP 3.7.1 / Custom Sidebars 1.4:function getCustomSidebars(){ $sidebars = get_option( $this->option_name ); if( $sidebars ) { $sidebars_by_name = array(); foreach($sidebars as $bar) { $sidebars_by_name[ $bar['name'] ] = $bar; } ksort($sidebars_by_name); return array_values( $sidebars_by_name ); } return array(); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Feature request: sort custom sidebars by name’ is closed to new replies.