Remove "Enter API Key" from Sub-sites in network

This topic contains 2 reply and 2 voices, and was last updated by Mike 10 years, 11 months ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
May 8, 2013 at 12:53 am 3335
Mike Hey Tareq Hope you are doing well. Found another issue with multisite that I would need corrected before going live. Anytime a user on a multisite network creates their own site, they see this box in their dashboard "Please enter your WP User Frontend plugin license key to get regular update and support." I have already entered the key on the main site in the network so really don't need my users to see this particular box on the sub sites and definitely don't want them to have my API key. Any chance on being able to remove this from sub sites? Thanks!
May 8, 2013 at 1:33 pm 3352
Tareq Hasan Tareq Hasan

How interesting it is to find these issues.

May be you can replace the code in updates.php
[php]
add_action( ‘admin_notices’, array($this, ‘license_enter_notice’) );
add_action( ‘admin_notices’, array($this, ‘license_check_notice’) );
[/php]

Replace with
[php]
if ( is_multisite() ) {
if ( is_main_site() ) {
add_action( ‘admin_notices’, array($this, ‘license_enter_notice’) );
add_action( ‘admin_notices’, array($this, ‘license_check_notice’) );
}
} else {
add_action( ‘admin_notices’, array($this, ‘license_enter_notice’) );
add_action( ‘admin_notices’, array($this, ‘license_check_notice’) );
}
[/php]

I’ll include them in next release.

May 8, 2013 at 7:32 pm 3369
Mike Mike

Thanks as always Tareq! I will play with this today. Look forward to some cool new features or “add ons” for us developer licensee members 😉

Viewing 2 Posts - 1 through 2 (of 2 total)