How do I alter the output of a field using a views handler
You add your custom views handler using hook_views_data() like so:

function mymodule_views_data() {
  $data = array(
    ['my_table_name'] =&gt; array(
      'my_field_alias' =&gt; array(
        'real field' =&gt; 'my_field_id',
        'group' =&gt; t('Testing'),
        'title' =&gt; t('Testing'),
        'help' =&gt; t('Testing a thing.'),
        'field' =&gt; array(
          'handler' =&gt; 'my_custom_views_handler_test',
          'click sortable' =&gt; TRUE,
        ),
        'sort' =&gt; array(
          'handler' =&gt; 'views_handler_sort',
        ),
        'filter' =&gt; array(
          'handler' =&gt; 'views_handler_filter_string',
        ),
        'argument' =&gt; array(
          'handler' =&gt; 'views_handler_argument_string',
        ),
      ),
    ),
  );

return $data;
}


And then you declare your custom views handler:

class my_custom_views_handler_test extends views_handler_field {
  /**
   * Render some stuff.
   *
   * Data should be made XSS safe prior to calling this function.
   */
  function render($values) {
    $value = $this-&gt;get_value($values);
    return $this-&gt;sanitize_value($value);
  }
}


Almost all changes you'll be wanting to make should be made in an override of the render function.