-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtoc_pane.module
More file actions
35 lines (32 loc) · 769 Bytes
/
toc_pane.module
File metadata and controls
35 lines (32 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @file
* Provides a ctools content type for table of contents
*/
/**
* Implements hook_ctools_plugin_directory
*/
function toc_pane_ctools_plugin_directory($owner, $plugin_type) {
if ($owner == 'ctools' && $plugin_type == 'content_types') {
return 'plugins/' . $plugin_type;
}
}
/**
* Get the location of the jquery library.
*
* @return
* The location of the library, or FALSE if the library isn't installed.
*/
function toc_pane_get_toc_path() {
$path = FALSE;
if (function_exists('libraries_get_path')) {
$path = libraries_get_path('toc');
if (!file_exists($path)) {
$path = FALSE;
}
}
elseif (file_exists('sites/all/libraries/toc/toc.min.js')) {
$path = 'sites/all/libraries/toc';
}
return $path;
}