function mp3player_exclude_these_paths in MP3 Player 6.2
Same name and namespace in other branches
- 6 mp3player.module \mp3player_exclude_these_paths()
Return TRUE if current path is disabled for mp3player according to mp3player_page_list and mp3player_page_init_action.
File
- ./
mp3player.module, line 720 - mp3player main module file.
Code
function mp3player_exclude_these_paths() {
$action = variable_get('mp3player_page_init_action', 'page_disable');
$page_list = variable_get('mp3player_page_list', '');
if (!empty($page_list)) {
// 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_disable' ? 1 : 0;
}
}
return $action == 'page_disable' ? 0 : 1;
}