Home Forums Plugin Support WP User Frontend Pro Remove "Enter API Key" from Sub-sites in network

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Mike 5 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3335

    Mike
    Participant
    Post count: 26

    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!

    #3352

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #3369

    Mike
    Participant
    Post count: 26

    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 3 posts - 1 through 3 (of 3 total)

The topic ‘Remove "Enter API Key" from Sub-sites in network’ is closed to new replies.