You are here

function fractionslider_exclude_these_paths in Views FractionSlider 7.2

Helper function to get pages to load JS plugin.

1 call to fractionslider_exclude_these_paths()
fractionslider_init in ./fractionslider.module
Implements hook_init().

File

./fractionslider.module, line 42
Module file.

Code

function fractionslider_exclude_these_paths() {
  $action = variable_get('fractionslider_page_init_action', 'page_enable');
  $page_list = variable_get('fractionslider_page_list', '');
  if (!empty($page_list) && $action != 'page_enable') {

    // Retrieve Drupal alias for the current path (if exists).
    $alias = drupal_get_path_alias($_GET['q']);
    if (drupal_match_path($_GET['q'], $page_list) || drupal_match_path($alias, $page_list)) {
      return $action == 'page_enable' ? 1 : 0;
    }
  }
  return $action == 'page_enable' ? 0 : 1;
}