function wysiwyg_get_path in Wysiwyg 5.2
Same name and namespace in other branches
- 5 wysiwyg.module \wysiwyg_get_path()
- 6.2 wysiwyg.module \wysiwyg_get_path()
- 6 wysiwyg.module \wysiwyg_get_path()
- 7.2 wysiwyg.module \wysiwyg_get_path()
Helper function to build paths to libraries.
Parameters
$library: The external library name to return the path for.
$base_path: Whether to prefix the resulting path with base_path().
Return value
The path to the specified library.
Related topics
7 calls to wysiwyg_get_path()
- wysiwyg_get_all_editors in ./
wysiwyg.module - Compile a list holding all supported editors including installed editor version information.
- wysiwyg_jwysiwyg_editor in editors/
jwysiwyg.inc - Plugin implementation of hook_editor().
- wysiwyg_markitup_editor in editors/
markitup.inc - Plugin implementation of hook_editor().
- wysiwyg_openwysiwyg_editor in editors/
openwysiwyg.inc - Plugin implementation of hook_editor().
- wysiwyg_tinymce_editor in editors/
tinymce.inc - Plugin implementation of hook_editor().
File
- ./
wysiwyg.module, line 821 - Integrate client-side editors with Drupal.
Code
function wysiwyg_get_path($library, $base_path = FALSE) {
static $libraries;
if (!isset($libraries)) {
$libraries = wysiwyg_get_libraries();
}
if (!isset($libraries[$library])) {
// Most often, external libraries can be shared across multiple sites.
return 'sites/all/libraries/' . $library;
}
$path = $base_path ? base_path() : '';
$path .= $libraries[$library];
return $path;
}