• Hi, would it be possible to add action hooks and filters to the replace function? Something like this (starting on line 370 in class-easy-media-replace-admin.php):

    
                if ($change_modified_time) {
                    $post_update = [
                        'ID'                => $attachment_id,
                        'post_modified'     => current_time('mysql'),
                        'post_modified_gmt' => current_time('mysql', 1),
                    ];
                    wp_update_post(apply_filters('emr_modify_date', $post_update));
                }
    do_action('emr_update_attachment', $attachment_id)
                wp_cache_flush();

    If this is on Guthub somewhere I’m happy to submit a PR there, just send me a link. Thanks!

  • The topic ‘Proposed Hook / Filter on replace’ is closed to new replies.