Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_terms_orderby

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
677      else if ( 'name' == $_orderby )
678           $orderby = 't.name';
679      else if ( 'slug' == $_orderby )
680           $orderby = 't.slug';
681      else if ( 'term_group' == $_orderby )
682           $orderby = 't.term_group';
683      elseif ( empty($_orderby) || 'id' == $_orderby )
684           $orderby = 't.term_id';
685
686      $orderby = apply_filters( 'get_terms_orderby', $orderby, $args );
687
688      $where = '';
689      $inclusions = '';
690      if ( !empty($include) ) {
691           $exclude = '';
692           $exclude_tree = '';
693           $interms = preg_split('/[\s,]+/',$include);
694           if ( count($interms) ) {
695                foreach ( (array) $interms as $interm ) {