• Resolved bestrategie

    (@bestrategie)


    Hi,

    We rewrote the plugin a bit to change direction where files are saved. I have a question, what if the plugin will be updated? Will it rewrite our changed code? If so can we block auto update?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author mirceatm

    (@mirceatm)

    Hi,
    I assume that yes, your changes will be overwritten in case a new version is installed/updated.
    You can block auto-update, although I would not do it myself – security is important. You might want to consider creating a different plugin that you maintain yourself.
    I’m considering adding a feature (wordpress filter hook) where the final filename of the attachment can be modified by other plugins/themes – that would render your current plugin changes redundant.

    Plugin Author mirceatm

    (@mirceatm)

    Hi,
    Plugin was updated to 1.2.0
    File path and name are sent to your code, by means of filters and you can change it. Filter in question is: nmr_create_attachment_file_name
    Do something along the lines (not tested):

    
    // The filter callback function.
    function example_callback( $file_name ) {
        // (maybe) modify $file_name.
        return $file_name;
    }
    add_filter( 'nmr_create_attachment_file_name', 'example_callback', 10, 1 );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Updates’ is closed to new replies.