You are here

function _js_injector_rule_path in JS injector 6.2

Same name and namespace in other branches
  1. 8 js_injector.module \_js_injector_rule_path()
  2. 7.2 js_injector.module \_js_injector_rule_path()
  3. 7 js_injector.module \_js_injector_rule_path()

Helper function to get file path for a rule

5 calls to _js_injector_rule_path()
js_injector_edit in ./js_injector.admin.inc
Constructor for the js rule edit form.
js_injector_edit_save in ./js_injector.admin.inc
Submit button callback for the js rule edit form.
js_injector_init in ./js_injector.module
Implementation of hook_init(). Checks to see whether any js files should be added to the current page, based on rules configured by the site administrator.
theme_js_injector_admin_form in ./js_injector.admin.inc
Theme function for the js Injector admin overview form.
_js_injector_delete_rule in ./js_injector.module
Helper function to delete an existing rule and its accompanying file.

File

./js_injector.module, line 189
Allows administrators to inject js into the page output based on configurable rules. Useful for adding simple js tweaks without modifying a site's official theme.

Code

function _js_injector_rule_path($crid) {
  if (!empty($crid)) {
    $directory = file_directory_path();
    return $directory . '/js_injector_' . $crid . '.js';
  }
  return NULL;
}