Skip to content

Commit

Permalink
Don't show settings links on Multisite unless is_network_admin()
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Feb 21, 2016
1 parent 8b0a656 commit 1ac20ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/includes/closures/Plugin/MenuPageUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@
* @return array Revised array of links.
*/
$self->addSettingsLink = function ($links) use ($self) {
if (is_multisite() && !is_network_admin()) {
return $links;
}

$links[] = '<a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS)), self_admin_url('/admin.php'))).'">'.__('Settings', SLUG_TD).'</a>';
if (!IS_PRO) {
$links[] = '<br/><a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS, GLOBAL_NS.'_pro_preview' => '1')), self_admin_url('/admin.php'))).'">'.__('Preview Pro Features', SLUG_TD).'</a>';
Expand Down

0 comments on commit 1ac20ff

Please sign in to comment.