• Resolved Trevsweb

    (@trevsweb)


    Hi looking to add a hook to my functions.php that can catch when an attachment/image is added to the system.

    trying to get it to log the folder id of the attachment while its uploading.
    ive tried add_attachment but it only comes back with -1

    tried wp_attachment_folder and wp_rml_get_object_by_id but these only work when editing the file not when it first gets uploaded

    basically I just want to pass which folder RML is storing the file in to the post that is being created into its meta. when i can get a valid folder id the rest should be fine with my code.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function hook: get folder id’ is closed to new replies.