The MU forums have moved to WordPress.org

add_meta_box bug (2 posts)

  1. DeannaS
    Member
    Posted 14 years ago #

    I think I may have found a bug, but before I put it in trac, I thought I'd see what you all thought. Is this a bug or a "feature."

    If you throw the following code into a file and put it in mu-plugins, and go to edit a page and click on "screen options" in the upper right corner, you'll see that you can now toggle on/off the visibility of the "publish" meta box. In the code, it looks like the on/off toggle for the publish box should always be hidden. I've narrowed it down to a plugin adding a meta box in the "advanced" context. If you add it in the "normal" context it doesn't happen.

    Thoughts?

    <?php
    add_action('admin_menu', 'cets_add_test');
    
    function cets_add_test() {
    	add_meta_box('cets_meta_test', 'CETS Meta Test', 'cets_meta_test', 'page', 'advanced'); // advanced/normal can go here...
    }
    
    function cets_meta_test() {
    	//do something here
    	echo ('This is just a test.');
    }
    ?>
  2. DeannaS
    Member
    Posted 14 years ago #

    Okay....let me answer my own question.

    I do believe it IS a bug. But, it doesn't happen if you run the code from trunk. So....we'll call that fixed in 2.9-whatever.

About this Topic