WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate Metabox Tabs
[resolved] Incompatibility with Codepress Admin Columns (3 posts)

  1. Sweet Homes
    Member
    Posted 1 year ago #

    Hi SilbinaryWolf,

    Ultimate Metabox Tabs don't work with Codepress Admin Columns (VersiĆ³n 1.4.6.4, last).

    Any stuff?

    Thanks and great plugin.

    http://wordpress.org/extend/plugins/ultimate-metabox-tabs/

  2. SilbinaryWolf
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Sweet Homes,

    The creator of that plugin has used the admin_body_class hook incorrectly and the error is his/her fault.

    Replace admin_class in codepress-admin-columns.php with:

    function admin_class($classes)
    	{
    		global $current_screen;
    
    		// we dont need the 'edit-' part
    		$screen = str_replace('edit-', '', $current_screen->id);
    
    		// media library exception
    		if ( $current_screen->base == 'upload' && $current_screen->id == 'upload' ) {
    			$screen = 'media';
    		}
    
    		// link exception
    		if ( $current_screen->base == 'link-manager' && $current_screen->id == 'link-manager' ) {
    			$screen = 'links';
    		}
    
    		// loop the available types
    		foreach ( $this->get_types() as $type => $label ) {			
    
    			// match against screen or wp-screen
    			if ( $type == $screen || $type == "wp-{$screen}" )
    				return $classes . " cp-{$type}";
    		}
    		return $classes;
    	}

    I've posted a topic on the support section of his plugin, telling him how to fix it.

    Cheers, Jake.

  3. Tobias Schutter
    Member
    Posted 1 year ago #

    You are right. I forgot to return the $classes from that admin_class filter. I will fix it in the next release. Thanks for spotting that!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic