Skip to content

Instantly share code, notes, and snippets.

@rahularyan
Created June 13, 2014 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahularyan/73432601f75c7aba4d63 to your computer and use it in GitHub Desktop.
Save rahularyan/73432601f75c7aba4d63 to your computer and use it in GitHub Desktop.
<?php
qw_apply_filter('doctype','navigation');
function navigation($themeclass) {
$link = array(
'label' => qa_lang_html('notification/notf_settings_user_nav'),
'url' => qa_path_html('notification-settings'),
'icon' => 'icon-cog' ,
);
if(qa_is_logged_in()) {
$themeclass['navigation']['user']['notification-settings'] = $link ;
if(qa_request_part(0) == 'notification-settings') {
$themeclass['navigation']['user']['notification-settings']['selected'] = true;
}
}
$handle = qa_request_part(1) ;
if ($handle == qa_get_logged_in_handle() || qa_request_part(0) == 'notification-settings') {
$themeclass['navigation']['sub']['notification-settings'] = $link ;
if(qa_request_part(0) == 'notification-settings') {
$themeclass['navigation']['sub']['notification-settings']['selected'] = true;
}
}
return $themeclass;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment