Category Company Email Destination Actions
function uplaod_handle_image_upload($file) { if (isset($file['name'])) { // Check file type $file_info = wp_check_filetype($file['name']); if ($file_info['ext'] && !in_array($file_info['ext'], array('jpg', 'jpeg', 'png', 'gif'))) { // Handle invalid file type return false; } // Check for a successful upload if ($file['error'] !== UPLOAD_ERR_OK) { return false; } // Handle the upload using move_uploaded_file $file_name = basename($file['name']); $upload_dir = wp_upload_dir(); $file_path = $upload_dir['path'] . $file_name; // Replace '/path/to/upload/directory/' with your desired upload directory if (!move_uploaded_file($file['tmp_name'], $file_path)) { // Handle the case where move_uploaded_file returns false return false; } // Create attachment post $attachment = array( 'post_mime_type' => $file_info['type'], 'post_title' => $file_name, 'post_content' => '', 'post_status' => 'inherit' ); $attachment_id = wp_insert_attachment($attachment, $file_path); if (is_wp_error($attachment_id)) { // Handle the case where wp_insert_attachment returns an error return false; } if (!function_exists('custom_generate_attachment_metadata')) { function custom_generate_attachment_metadata($attachment_id, $file_path) { //echo "string" . $metadata; // Check if file exists if (!file_exists($file_path)) { return new WP_Error('file_not_found', 'File not found.'); } // Get file information $file_info = wp_check_filetype($file_path); $mime_type = $file_info['type']; // Generate attachment metadata $metadata = array( 'width' => 0, 'height' => 0, 'file' => basename($file_path), 'sizes' => array(), 'image_meta' => array() ); // Set image dimensions if the file is an image if (substr($mime_type, 0, 5) === 'image') { $image_size = getimagesize($file_path); if ($image_size) { $metadata['width'] = $image_size[0]; $metadata['height'] = $image_size[1]; } } return $metadata; } } // Generate attachment metadata and update attachment post $attachment_data = custom_generate_attachment_metadata($attachment_id, $file_path); if (is_wp_error($attachment_data)) { // Error occurred, handle it echo 'Error generating attachment metadata: ' . $attachment_data->get_error_message(); } else { // Metadata generated successfully, update attachment if (wp_update_attachment_metadata($attachment_id, $attachment_data)) { //echo 'Attachment metadata updated successfully.'; } else { echo 'Error updating attachment metadata.'; } } return $attachment_id; } } add_shortcode('company_user', 'companyProfileShortcode'); Oscars Night for the Irish Travel Industry | ittn.ie
HomePhoto GalleryOscars Night for the Irish Travel Industry

Oscars Night for the Irish Travel Industry

On Friday 25th November 2011 nearly 300 principals and representatives of Ireland’s top travel companies and travel agencies enjoyed a great night out at the inaugural Irish Travel Industry Christmas Party held at the Burlington Hotel in Dublin, presented by Irish Travel Trade News.

It was a night when everyone was a winner because not only were 34 prizes awarded – 22 Irish Travel Trade Awards, the inaugural Irish Travel Industry Entrepreneur of the Year Award (won by Liam Lonergan of Club Travel), the second Ireland’s Favourite Travel Agent Award (won again by Sunway Travel), the Travel Agent Voter of the Year (Gearoid Lynch of Mallow Travel), and nine Prize Draws of tickets for two to destinations worldwide – but also the event’s headline sponsor, Etihad Airways, presented a €50 voucher on the place settings for “everyone in the audience”.

Alan Sparling of SAS (Scandinavian Airline System) voiced the view of many attendees by saying: “This is an absolutely fabulous evening and is one of the best I have been to – I have met lots of people whom I haven’t seen for a while. Very well done to the organising team.”

The heads of Ireland’s two largest tour operator companies independently complimented the room décor. John Kinane of Thomas Cook Holidays said: “This is a good evening and the room looks really well” while Christine Donnelly of Falcon/Thomson Holidays, said: “I am absolutely amazed by the buzz, the excitement and the great atmosphere that has been created, which shows the resilience of the travel trade. The room is tremendous – it looks really good.”

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Logo
3,040 Followers
Follow

Must Read