WYSIWYG module is not finding my custom plugin I am building a custom plugin. I have the WYSIWYG module 7.x-2.x-dev. I have followed the instructions here.

I realize that this question is similar to this and this. However I think this may be a slightly different issue so I am going to try a new thread.

Pertinent code:

&lt;?php
/**
 * Implements hook_wysiwyg_editor_settings_alter().
 */
function my_module_wysiwyg_editor_settings_alter(&amp;$settings, $context) {
  if ($context['profile']-&gt;editor == 'ckeditor') {
  $settings['extraPlugins'] = 'my_plugin';
 }
}

/**
* Implements hook_wysiwyg_include_directory().
*/
function my_module_wysiwyg_include_directory($type) {
switch ($type) {
  case 'plugins':
    // You can just return $type, if you place your Wysiwyg plugins into a
    // sub-directory named 'plugins'.
    return $type;
 }
}
/**
* Implementation of hook_ckeditor_plugin().
*/
function my_module_ckeditor_plugin() {
 $module_path = drupal_get_path('module', 'my_module');
 $plugins = array();
 return array('my_plugin' =&gt; array(
  'name' =&gt; 'My Plugin',
  'desc' =&gt; t('Custom plugin to add button styles in the WYSIWYG.'),
  'path' =&gt; $module_path . '/plugins/my_plugin/',
 ),);
}

/**
 *  Implements hook_wysiwyg_plugin().
 */
function my_module_wysiwyg_plugin($editor, $version) {
 switch ($editor) {
  case 'ckeditor':
   $module_path = drupal_get_path('module', 'my_module');
   return array('my_plugin' =&gt; array(
    'filename' =&gt; 'plugin.js',
    'path' =&gt; $module_path . '/plugins/my_plugin',
    'buttons' =&gt; array(
      'style_1' =&gt; t('Style 1'),
    ),
    'load' =&gt; TRUE,
    'internal' =&gt; FALSE,
  ),);
 break;
 }
}


This produces a blank area where the CKEditor should be and the error logs still say that it is looking in the sites/all/libraries/ instead of my custom module folder. Any ideas on what I am missing?
Turns out the tutorials and answers were wrong (at least for my set up/needs) The extra hooks and $settings['extraPlugins'] = 'button_styles'; were probably causing conflicts. I removed all but this;

function MY_MODULE_wysiwyg_plugin($editor, $version) {
switch ($editor) {
  case 'ckeditor':
    $module_path = drupal_get_path('module', 'MY_MODULE');
    return array('my_plugin' =&gt; array(
      'path' =&gt; $module_path . '/plugins/MY_PLUGIN/',
      'buttons' =&gt; array(
        'style_1' =&gt; t('Style 1'),
      ),
      'load' =&gt; TRUE,
    ),);
  break;
 }
}


and now it recognizes my plugin.js.