2

I want to insert a custom button between "Publish" button and "Move To Trash" link. What can I use to make this?

Here is a screenshot to make this clearer:

enter image description here

I know I can use jQuery, but I want to do it the wordpress way. May be there is a filter hook or something else for it?

3

There is an action before the Trash link: post_submitbox_start.

You can use it to add content to that box. The Trash has a float:left, so it will move to the side.

Example:

add_action( 'post_submitbox_start', function() {
    print '<button>Hey!</button>';
});

Result:

enter image description here

  • It is still adding it before the default stuffs. But I think it is the only way. Are we have a chance to ask wordpress to add a hook between Move to Trash and Publish button? – Ari Sep 8 '15 at 23:08
  • 1
    @SoursopTree Sure, open a ticket, provide a use case, and maybe even a patch. – fuxia Sep 9 '15 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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