I use the http://www.deluxeblogtips.com/meta-box Metabox plugin and I want to add a custom action in a post type like the publish button ? when admin click on this button I want to send an email to the author and delete the current post type.

I have added the button in my post like this :

    // meta box
    $meta_boxes[] = array(
            'title' => __('Reviewer','sparta'),
            'pages' => array( 'download'),
            'fields' => array(
            'name' => __('Reject','sparta'),
            'desc' => __('reject this                  post.','sparta'),
                      'id' => $prefix . 'reject_post',
                      'type' => 'button',
                      'std' => ''

My question is how to execute my action from this button ? someone has an idea ?

Thank you very much

  • 1
    What happens when you click the button? Does the form submit? Are you hoping to do this via AJAX? Please clarify.
    – s_ha_dum
    Commented Feb 3, 2014 at 14:18
  • when i hit the button no things happen, here the code for the button field : github.com/rilwis/meta-box/blob/master/inc/fields/button.php
    – Abdeel
    Commented Feb 3, 2014 at 21:21
  • Is the generated markup for the button correct?
    – s_ha_dum
    Commented Feb 3, 2014 at 21:22
  • yes it is :<div class="rwmb-input"><a href="#" id="wp_author_reject" class="button hide-if-no-js">Click me</a></div>
    – Abdeel
    Commented Feb 3, 2014 at 21:34
  • That "button" isn't really a button. It is a link and it looks like it is intended to operate via Javascript.
    – s_ha_dum
    Commented Feb 3, 2014 at 22:30

1 Answer 1


I found this solution here: WP plugin that add a button to post edit page that allow sending a notify to a contributor whose a post was not approved. It's possible customize the message including the reason for rejected approval.


I have not tested it but it seems legit!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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