Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.