Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @since 1.0
  */
 function __construct($storage_model)
 {
     parent::__construct($storage_model);
     // default sortby
     $this->default_orderby = '';
     // handle sorting request
     add_filter('comments_clauses', array($this, 'handle_sorting_request'), 10, 2);
     // register sortable headings
     add_filter("manage_edit-comments_sortable_columns", array($this, 'add_sortable_headings'));
     // add reset button
     add_action('restrict_manage_comments', array($this, 'add_reset_button'));
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @since 1.0
  */
 function __construct($storage_model)
 {
     parent::__construct($storage_model);
     // default sortby
     $this->default_orderby = 'menu_order title';
     // handle sorting request
     add_filter('request', array($this, 'handle_sorting_request'), 1);
     // register sortable headings
     add_filter("manage_edit-{$this->storage_model->key}_sortable_columns", array($this, 'add_sortable_headings'));
     // add reset button
     add_action('restrict_manage_posts', array($this, 'add_reset_button'));
 }