$fields['url']);*/ $fields_dup['data'] = array("postid" => $post->ID, "sharelink" => $fields['url']); $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); $fields_dup['big_picture'] = $url; $fields_dup['buttons'] = '[{"id": "id1", "text": "Settings", "icon": "ic_menu_manage"}, {"id": "id2", "text": "Share", "icon": "ic_menu_share"}]'; unset($fields_dup['url']); /* Send another notification via cURL */ $ch = curl_init(); $onesignal_post_url = "https://onesignal.com/api/v1/notifications"; /* Hopefully OneSignal::get_onesignal_settings(); can be called outside of the plugin */ $onesignal_wp_settings = OneSignal::get_onesignal_settings(); $onesignal_auth_key = $onesignal_wp_settings['app_rest_api_key']; curl_setopt($ch, CURLOPT_URL, $onesignal_post_url); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Authorization: Basic ' . $onesignal_auth_key )); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields_dup)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Optional: Turn off host verification if SSL errors for local testing // curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); /* Optional: cURL settings to help log cURL output response curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_setopt($ch, CURLOPT_HTTP200ALIASES, array(400)); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_STDERR, $out); */ $response = curl_exec($ch); /* Optional: Log cURL output response fclose($out); $debug_output = ob_get_clean(); $curl_effective_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); $curl_http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $curl_total_time = curl_getinfo($ch, CURLINFO_TOTAL_TIME); onesignal_debug('OneSignal API POST Data:', $fields); onesignal_debug('OneSignal API URL:', $curl_effective_url); onesignal_debug('OneSignal API Response Status Code:', $curl_http_code); if ($curl_http_code != 200) { onesignal_debug('cURL Request Time:', $curl_total_time, 'seconds'); onesignal_debug('cURL Error Number:', curl_errno($ch)); onesignal_debug('cURL Error Description:', curl_error($ch)); onesignal_debug('cURL Response:', print_r($response, true)); onesignal_debug('cURL Verbose Log:', $debug_output); } */ curl_close($ch); return $fields; } ?> Amazing historical facts | Amazing Facts

Amazing historical facts

Amazing Facts
longest-war

1. The longest war in history was between the Netherlands and Isles of scilly, which lasted from 1651 to 1986 almost 335 years but no casuality recorded.

china-deadliest-war

2. Out of the ten deadliest wars even seven were fought in china alone more people died in each of the largest two of them than in world war I.

stalingrad war

3.In one day of heavy fighting during the battle of stalingrad, a local railway station changed hands from soviet to German control and back again fourteen times in six hours.

napoleon-bonaparte

4.  Napolean was once attacked by rabbits.

albert-einstein

5.  Albert einstein was offered the role of Isral’s second president in 1952, but he declined.

civilisation-history

6. Humans appeared 200,000 years ago written records begin 6000 years ago that means 97% of history is lost.

peace

7.  It has been calculated that in the last 3500 years, there have been only 230 years of peace through out the civilized world.

first-motion-picture

8.  The first public screening of projected motion picture for admission was held on 29 December 1985.

american-flag

9. The current US flag was designed by the 17 year old Robert G Heft, as a part of a school project for his effort, he received a grade ‘B’. when his design was chossen and adopted by presidential proclamation, his teacher changed his grade to an ‘A’.

inter-racial-marriage

10. Interracial marriage was banned in south Africa from 1949 to 1985 nearly 36 years and the same was banned in US from 1776 to 1967 years nearly 191 years.