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

  1. Andrew
    Posted 3 years ago #


    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.





  2. Dion Hulse
    Lead Developer
    Plugin Author

    Posted 3 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
    Posted 3 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

  • Add From Server
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic