メインコンテンツに移動

メインナビゲーション

  • ホーム
  • サイトマップ
  • ビデオ
  • ご連絡

パンくず

  • ホーム
  • すべのEditorの取得

すべのEditorの取得

drupal
drupal
rich text editor
wysiwyg module

wydiwygモジュールに用意しているすべてのEditorを取得する

  • editorsのディレクトリ名
  • $hook:各Editorの名前

function wysiwyg_load_includes($type = 'editors', $hook = 'editor', $file = NULL) {
  // Determine implementations.
  $directories = wysiwyg_get_directories($type);
  $directories['wysiwyg'] = drupal_get_path('module', 'wysiwyg') . '/' . $type;
  $file_list = array();
  foreach ($directories as $module => $path) {
    $file_list[$module] = drupal_system_listing("/{$file}.inc\$/", $path, 'name', 0);
  }

  // Load implementations.
  $info = array();
  foreach (array_filter($file_list) as $module => $files) {
    foreach ($files as $file) {
      include_once './' . $file->uri;
      $result = _wysiwyg_process_include($module, $module . '_' . $file->name, dirname($file->uri), $hook);
      if (is_array($result)) {
        $info = array_merge($info, $result);
      }
    }
  }
  return $info;
}

 

 

ホーム

古松

検索

Article Category

  • apache(7)
  • css(19)
  • drupal(295)
  • Electron(4)
  • html(34)
  • javascript(27)
  • laravel(4)
  • linux(5)
  • macOS(2)
  • mysql(13)
  • php(19)
  • python(4)
  • SEO(12)
  • video(72)
  • Visual Studio Code(4)
  • windows(13)
  • wordpress(32)