Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: manage_{$this->screen->id}_sortable_columns

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
598       * @return array
599       */
600      function get_column_info() {
601           if ( isset( $this->_column_headers ) )
602                return $this->_column_headers;
603
604           $columns = get_column_headers( $this->screen );
605           $hidden = get_hidden_columns( $this->screen );
606
607           $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $this->get_sortable_columns() );
608
609           $sortable = array();
610           foreach ( $_sortable as $id => $data ) {
611                if ( empty( $data ) )
612                     continue;
613
614                $data = (array) $data;
615                if ( !isset( $data[1] ) )
616                     $data[1] = false;