Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
400 views
in Plugins by

Ultimate SEO page showing default in admin page navigation for all admin (editor, moderator, expert) . I want to show this navigation for only Admin.

I'm trying by this : 

// Administrator panel navigation item

if ($this->request == 'admin/ulitmate_seo') {

if(empty($this->content['navigation']['sub']))

$this->content['navigation']['sub']=array();

require_once QA_INCLUDE_DIR.'qa-app-admin.php';

$admin_nav = qa_admin_sub_navigation();

$this->content['navigation']['sub'] = array_merge(

$admin_nav,

$this->content['navigation']['sub']

);

}

if ( ($this->template=='admin') or ($this->request == 'ulitmate_seo') ){

$this->content['navigation']['sub']['ulitmate_seo'] = array(

'label' => 'Ultimate SEO',

'url' => qa_path_html('admin/ulitmate_seo'),

);

if ($this->request == 'admin/ulitmate_seo'){

$this->content['navigation']['sub']['ulitmate_seo']['selected'] = true;

}

}

}

To 

// Administrator panel navigation item

if ($this->request == 'admin/ulitmate_seo') AND  (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN){

if(empty($this->content['navigation']['sub']))

$this->content['navigation']['sub']=array();

require_once QA_INCLUDE_DIR.'qa-app-admin.php';

$admin_nav = qa_admin_sub_navigation();

$this->content['navigation']['sub'] = array_merge(

$admin_nav,

$this->content['navigation']['sub']

);

}

if ( ($this->template=='admin') or ($this->request == 'ulitmate_seo') ){

$this->content['navigation']['sub']['ulitmate_seo'] = array(

'label' => 'Ultimate SEO',

'url' => qa_path_html('admin/ulitmate_seo'),

);

if ($this->request == 'admin/ulitmate_seo'){

$this->content['navigation']['sub']['ulitmate_seo']['selected'] = true;

}

}

Q2A version: 1.8.2

Please log in or register to answer this question.

...