Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author SilbinaryWolf

    (@silbinarywolf)

    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.

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incompatibility with Codepress Admin Columns’ is closed to new replies.