Use the admin_body_class properly (Bug fix in your plugin included)
-
I recently got a complaint that my “Ultimate Metabox Tabs” plugin was incompatible with your plugin.
This is due to the fact that your “admin_body_class” hook was used incorrectly, below is a patch for your function in “codepress-admin-columns.php”
You need to pass the original classes through the return.
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; }
Cheers, Jake.
https://www.ads-software.com/extend/plugins/codepress-admin-columns/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Use the admin_body_class properly (Bug fix in your plugin included)’ is closed to new replies.