WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #23421


Ignore:
Timestamp:
02/08/13 12:45:14 (15 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23421

    • Property Type changed from feature request to enhancement
  • Ticket #23421 – Description

    initial v1  
    88 
    99i.e. 
     10{{{ 
     11function get_sortable_columns() { 
     12        $default = array( 
     13                'title'    => 'title', 
     14                'parent'   => 'parent', 
     15                'comments' => 'comment_count', 
     16                'date'     => array( 'date', true ) 
     17        ); 
    1018 
    11 function get_sortable_columns() { 
    12   $default = array( 
    13               'title'    => 'title', 
    14               'parent'   => 'parent', 
    15               'comments' => 'comment_count', 
    16               'date'     => array( 'date', true ) 
    17               ); 
    18  
    19  return apply_filters( "manage_taxonomies_for_{$post_type}_sortable_columns", $default ); 
    20         } 
    21   
     19        return apply_filters( "manage_taxonomies_for_{$post_type}_sortable_columns", $default ); 
     20} 
     21}}} 
    2222The developer could then set the filter as normal 
    23 add_filter ( "manage_taxonomies_for_{$post_type}_columns", 'add_sortable_column' ); 
     23{{{ 
     24add_filter( "manage_taxonomies_for_{$post_type}_columns", 'add_sortable_column' ); 
    2425 
    2526function add_sortable_column ( $columns ) { 
    26  $columns[ taxonomy-tax_name ] = 'Taxonomy Label'; 
    27  return $columns; 
    28 }        
     27        $columns[ taxonomy-tax_name ] = 'Taxonomy Label'; 
     28        return $columns; 
     29} 
     30}}}