• Resolved shaktidevi

    (@shaktidevi)


    Hello,

    Can the filter attachment_fields_to_save be used in more than one plugin simultaneously? I have one plugin using it which is working, and I tried to add another but the second instance of it is not saving the fields (though it is showing them). The code in the second plugin is, in brief:

    function __construct() {
      //... some other stuff
      add_filter( 'attachment_fields_to_save', array( &$this, 'attachment_save_post'), 10, 2 );
      }
    
      function attachment_save_post($post, $attachment) {
            error_log("in attachment save post");
        $this->save_post($post['ID'], $attachment);
      }

    The attachment_save_post function is not getting hit – the error log line is not appearing in the error log.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘multiple use of attachment_fields_to_save’ is closed to new replies.