SHARE
TWEET

Untitled

a guest Jun 17th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function get_media_item_args( $args ) {
  2.  
  3.     if ($args["delete"] && $_GET["action" == "delete-post"])
  4.     {
  5.         $current_post_id = !empty( $_GET['id'] ) ? (int) $_GET['id'] : 0;
  6.  
  7.         if ($current_post_id > 0)
  8.         {
  9.             //Do your thing here.
  10.         }
  11.     }
  12.  
  13.     return $args;
  14. }
  15. add_filter( 'get_media_item_args', 'get_media_item_args', 10, 1 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top