WordPress.org

Ready to get started?Download WordPress

Forums

Add From Server
[resolved] Unused filter afs-import_details ln 382 in class.add-from-server (3 posts)

  1. Andrew
    Member
    Posted 2 years ago #

    Hi,

    Within the plugin I was going through the code and noticed on line 382 within the file class.add-from-server.php the following line:

    $attachment = apply_filters('afs-import_details', $attachment, $file, $post_id, $import_date);

    As far as I can tell afs-import_details doesn't exist. I could certainly be missing something but just thought I'd point it out for code cleanup. I'm thinking it is old because the prefix is using "afs" instead of the more prominent "frmsvr" found elsewhere in the plugin.

    :)

    Best,

    Andrew

    http://wordpress.org/extend/plugins/add-from-server/

  2. Dion Hulse
    WordPress Dev
    Plugin Author

    Posted 2 years ago #

    Filters are just names which are called, If there's nothing hooked to it (The plugin itself doesn't use it, it's simply there for other plugins and users to filter the attachment details) then it doesn't do anything (other than pass $attachment straight through).

    The prefix is different from the rest, but unfortunately, since it's already written/released like that, it'll be staying that way, just so as not to break anyone who's using it!

  3. Andrew
    Member
    Posted 2 years ago #

    Cool, sounds like a god reason to me. Thanks for responding.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic