Advertisement
daymobrew

Flamingo - add "Mark as Spam" link

Feb 6th, 2018
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.85 KB | None | 0 0
  1. --- admin/includes/meta-boxes.orig.php  2018-01-25 00:37:50.000000000 +0000
  2. +++ admin/includes/meta-boxes.php   2018-02-06 13:30:25.636242200 +0000
  3. @@ -123,6 +123,17 @@
  4.             'flamingo-trash-inbound-message_' . $post->id );
  5.  
  6.  ?><a class="submitdelete deletion" href="<?php echo $delete_link; ?>"><?php echo esc_html( $delete_text ); ?></a><?php } ?>
  7. +<?php
  8. +   if ( current_user_can( 'flamingo_delete_inbound_message', $post->id ) ) {
  9. +       $spam_text = __( 'Mark as Spam', 'flamingo' );
  10. +
  11. +       $spam_link = admin_url(
  12. +           sprintf( 'admin.php?page=flamingo_inbound&post=%s&action=spam', $post->id ) );
  13. +       $spam_link = wp_nonce_url( $spam_link,
  14. +           'flamingo-spam-inbound-message_' . $post->id );
  15. +
  16. +?><p><a class="submitdelete spam" href="<?php echo $spam_link; ?>"><?php echo esc_html( $spam_text ); ?></a></p><?php } ?>
  17. +
  18.  </div>
  19.  
  20.  <div id="publishing-action">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement