Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to remove the #minor-publishing div from the Publish admin metabox. I came across How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button and http://wordpress.org/extend/plugins/adminimize/ but they either remove it by css or custom-code their metabox.

Is there a way to remove the div by hooking on to some action and modifying the html that will be outputted for that metabox?

How to Move the Author Metabox into the "Publish" metabox? modifies the html output by adding code to it. What I need is to remove the entire #minor-publishing div from the html that will be output for the Publish admin metabox.

Thanks in advance.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

In short- no. The html in question is hard-coded in the post_submit_meta_box callback function.

You can, of course de-register the publish metabox and re-register your own which mimics post_submit_meta_box (but making your alterations) and being sure to keep the names of the inputs exactly the same. This method has been outlined the following posts where a core metabox is required to be edited.:

It's a lengthy function though - and would break if core ever changed decided to change the names of the inputs (though very unlikely).

In this situation I would probably recommend a CSS or javascript work-around....

share|improve this answer
    
kewl, will use CSS then.. thanks so much. –  Ana Ban May 16 '12 at 22:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.