ahmedkaludi / ads-for-wp

We are innovating in the Ads space by creating a Lightweight, Easy & Feature Rich Ad solution for WP & AMP
http://www.adsforwp.com/
22 stars 2 forks source link

Tabs link error in Multisite #290

Closed fnorte closed 4 years ago

fnorte commented 5 years ago

I have a multisite installation and I'm get an error every navigation into the tabs of settings page. The link try to send to my NETWORK page. Checking the code, in the function adsforwp_admin_link (line 641) there is a check for Multisite to make this redirect. But I think there is not necessary (and causing this problem) because each site has your own settings. The problem with this, I have to enter the link manually to get the tabs, and I can't import the ADs from one multisite to another (the "save" button try to send to Network page too), make me reenter every one manually.

fnorte commented 5 years ago

admin/control-center.php LINE 641: if ( ! is_multisite() ) { $link = admin_url( 'admin.php?page=' . $page ); } else { $link = network_admin_url( 'admin.php?page=' . $page ); }

Should be only: $link = admin_url( 'admin.php?page=' . $page );

Or check if is IN the network admin: if ( ! is_network_admin() ) { $link = admin_url( 'admin.php?page=' . $page ); } else { $link = network_admin_url( 'admin.php?page=' . $page ); }

santosh8793 commented 4 years ago

Pushed into 1.9.14