Welcome, visitor! Log in
 

Source View: term_{$field}_rss

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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

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
938       if ( 'edit' == $context ) {
939            $value = apply_filters("edit_term_$field", $value, $term_id, $taxonomy);
940            $value = apply_filters("edit_${taxonomy}_$field", $value, $term_id);
941            if ( 'description' == $field )
942                 $value = format_to_edit($value);
943            else
944                 $value = attribute_escape($value);
945       } else if ( 'db' == $context ) {
946            $value = apply_filters("pre_term_$field", $value, $taxonomy);
947            $value = apply_filters("pre_${taxonomy}_$field", $value);
948            // Back compat filters
949            if ( 'slug' == $field )
950                 $value = apply_filters('pre_category_nicename', $value);
951  
952       } else if ( 'rss' == $context ) {
953            $value = apply_filters("term_${field}_rss", $value, $taxonomy);
954            $value = apply_filters("${taxonomy}_${field}_rss", $value);
955       } else {
956            // Use display filters by default.
957            $value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context);
958            $value = apply_filters("${taxonomy}_$field", $value, $term_id, $context);
959       }
960  
961       if ( 'attribute' == $context )
962            $value = attribute_escape($value);
963       else if ( 'js' == $context )
964            $value = js_escape($value);
965  
966       return $value;
967  }
968