Create a custom area plugin I'm looking to add a plugin for Views to provide some custom functionality in the footer of a view.

First, I created the following in my_module/src/Plugin/views/area/MyPlugin.php:

namespace Drupal\my_module\Plugin\views\area;

use Drupal\views\Plugin\views\area\AreaPluginBase;

/**
 * Defines a views area plugin.
 *
 * @ingroup views_area_handlers
 *
 * @ViewsArea("my_plugin")
 */
class MyPlugin extends AreaPluginBase {

  /**
   * {@inheritdoc}
   */
  public function render($empty = FALSE) {
    if (!$empty || !empty($this-&gt;options['empty'])) {
      return array(
        '#markup' =&gt; 'test footer content',
      );
    }

    return array();
  }
}


When that didn't work on its own, I realized I needed to declare the plugin in my_module.views.inc:

/**
 * Implements hook_views_data().
 */
function my_module_views_data() {
  $data['views']['my_plugin'] = array(
    'title' =&gt; t('My Plugin'),
    'help' =&gt; t('My plugin description.'),
    'area' =&gt; array(
      'id' =&gt; 'my_plugin',
    ),
  );
  return $data;
}


With that added, I can get as far as seeing the plugin available for selection in an area under the Views admin screen. However, when I select the checkbox for it and click Apply, the button text changes to "Add and configure footer" but it doesn't move to the next step in the process.

I've had this happen when writing custom block plugins; the system don't let me place a block when the plugin has something wrong with it. Any thoughts as to what I have here that is wrong?
There was a typo in my plugin filename. :-/