Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Created December 3, 2021 14:19
Show Gist options
  • Save anthonysbrown/9d87ecdd16d102674fd6f24c6be3800f to your computer and use it in GitHub Desktop.
Save anthonysbrown/9d87ecdd16d102674fd6f24c6be3800f to your computer and use it in GitHub Desktop.
<?php
/*
$a = db insert array
$file_id = the ID of the file
$post = the form post object
*/
add_action('sp_cdm_after_file_insert','my_file_insert',10,3);
function my_file_insert($a, $file_id ,$post){
global $wpdb;
#get the full path of the file to do something
$full_path_file = '' . SP_CDM_UPLOADS_DIR . '' . $a['uid']. '/'.$a['file'].'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment