A hook_libraries_info() for Owl Carousel

While I'm aware that this exists:  https://www.drupal.org/project/owlcarousel , lately I am often tasked to render content in code, rather than via views, DS, etc.

Here is a hook_libraries_info() entry (for the libraries module), that you can use:

<?php
$libraries
['owlcarousel'] = array(
   
'name' => 'Owl Carousel',
   
'vendor url' => 'http://owlgraphic.com/owlcarousel',
   
'version arguments' => array(
     
'file' => 'owl.carousel.js',
     
'pattern' => '/v([\d\.]+)/',
     
'lines' => 2,
    ),
   
'files' => array(
     
'js' => array('owl.carousel.min.js'),
     
'css' => array(
       
'owl.carousel.css',
       
'owl.theme.css',
       
'owl.transitions.css',
      ),
    ),
  );
?>

Add new comment

Joshua Walker