WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Custom Admin Branding] Header should not be shown in some cases. (3 posts)

  1. spencersokol
    Member
    Posted 4 years ago #

    The custom header is being shown in some places where it shouldn't be. It will appear in the media upload lightbox and in the upgrade plugin content area when a plugin is attempting to be reactivated after an upgrade.

    For the media upload lightbox, you can do a check for
    ('media-upload.php' == basename($_SERVER['PHP_SELF']))

    A workaround for the lightbox until you get this check added to the plugin is adding the following to your functions.php of your theme:

    // There's a bug in the Custom Admin Branding plugin
    if ('media-upload.php' == basename($_SERVER['PHP_SELF'])) {
    	remove_action('admin_head', 'custom_header', 11);
    }

    I'm not sure where the hook is for the plugin reactivation. You're on your own there. ;) But the output looks something like this

    Files downloaded
    Attempting reactivation of plugin
    
    [header shows up here]
    
    Plugin reactivated successfully.
  2. Josh Byers
    Member
    Posted 4 years ago #

    Thanks for the code addition. I always knew this happened but never looked at it as a bug.

    I suppose it would be best if the header didn't appear in those situations.

  3. ill.selettore
    Member
    Posted 4 years ago #

    Ditto to the "plug-in reactivation header bug." It would be really nice to see this resolved.

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic