What Can I Use To Add A Custom Button Between Publish button and Move To Trash?

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?

1 Answer
1

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

Leave a Comment