Beispiel #1
-1
 static function processAttachments($attachments = array())
 {
     if (!is_array($attachments) && $attachments) {
         $attachments = explode("\n", str_replace("\r\n", "\n", $attachments));
     }
     foreach ($attachments as $index => $attachment) {
         try {
             $attachments[$index] = Mandrill::getAttachmentStruct($attachment);
         } catch (Exception $e) {
             error_log("\nwpMandrill::processAttachments: {$attachment} => " . $e->getMessage() . "\n");
             return new WP_Error($e->getMessage());
         }
     }
     return $attachments;
 }