You are here

function biblio_citeproc_install_default_styles in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/biblio_citeproc.install \biblio_citeproc_install_default_styles()
  2. 7.2 modules/CiteProc/biblio_citeproc.install \biblio_citeproc_install_default_styles()
2 calls to biblio_citeproc_install_default_styles()
biblio_citeproc_install in modules/CiteProc/biblio_citeproc.install
biblio_citeproc_update_default_styles in modules/CiteProc/biblio_citeproc.install

File

modules/CiteProc/biblio_citeproc.install, line 124

Code

function biblio_citeproc_install_default_styles() {
  $record = array();
  $dir = drupal_get_path('module', 'biblio_citeproc') . '/style';
  $files = file_scan_directory($dir, '/..*.csl$/');
  foreach ($files as $file) {
    $csl = file_get_contents($file->uri);
    $name = basename($file->filename);
    biblio_citeproc_install_style($name, $csl);
  }
}