{"action":"opened","issue":{"url":"https://api.github.com/repos/openfcci/fcc-northland-outdoors-radio/issues/26","repository_url":"https://api.github.com/repos/openfcci/fcc-northland-outdoors-radio","labels_url":"https://api.github.com/repos/openfcci/fcc-northland-outdoors-radio/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/openfcci/fcc-northland-outdoors-radio/issues/26/comments","events_url":"https://api.github.com/repos/openfcci/fcc-northland-outdoors-radio/issues/26/events","html_url":"https://github.com/openfcci/fcc-northland-outdoors-radio/issues/26","id":135894431,"number":26,"title":"Update \"#Set embed meta on segment 1-3 post\" code","user":{"login":"rveitch","id":12876929,"avatar_url":"https://avatars.githubusercontent.com/u/12876929?v=3","gravatar_id":"","url":"https://api.github.com/users/rveitch","html_url":"https://github.com/rveitch","followers_url":"https://api.github.com/users/rveitch/followers","following_url":"https://api.github.com/users/rveitch/following{/other_user}","gists_url":"https://api.github.com/users/rveitch/gists{/gist_id}","starred_url":"https://api.github.com/users/rveitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rveitch/subscriptions","organizations_url":"https://api.github.com/users/rveitch/orgs","repos_url":"https://api.github.com/users/rveitch/repos","events_url":"https://api.github.com/users/rveitch/events{/privacy}","received_events_url":"https://api.github.com/users/rveitch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-23T23:06:03Z","updated_at":"2016-02-23T23:06:03Z","closed_at":null,"body":"### Overview\r\nUpdate the \"#Set embed meta on segment 1-3 post\" code in `insert-post-functions.php`.\r\n\r\n#### New Code\r\n\r\n```php\r\n#Set embed meta on segment 1 post\r\n  $segment_1_jw_key = get_post_meta($post_id, 'segment_1_key', true);\r\n  $mvp_video_embed = '<script type=\"text/javascript\" src=\"http://content.jwplatform.com/players/' . $segment_1_jw_key . '-XmRneLwC.js\"></script>' . '<div id=\"' . $segment_1_jw_key . '\">Loading the player...</div><script type=\"text/javascript\"> var playerInstance = jwplayer(\"' . $segment_1_jw_key . '\");playerInstance.setup({ file: \"//content.jwplatform.com/videos/' . $segment_1_jw_key . '.aac\",image:\"http://www.northlandoutdoors.com/files/2015/12/Northland-Outdoors-Logo_16x9.png\",});</script>';\r\n  update_post_meta($segment1_post_id, 'mvp_video_embed', $mvp_video_embed );\r\n  #Set embed meta on segment 2 post\r\n  $segment_2_jw_key = get_post_meta($post_id, 'segment_2_key', true);\r\n  $mvp_video_embed = '<script type=\"text/javascript\" src=\"http://content.jwplatform.com/players/' . $segment_2_jw_key . '-XmRneLwC.js\"></script>' . '<div id=\"' . $segment_2_jw_key . '\">Loading the player...</div><script type=\"text/javascript\"> var playerInstance = jwplayer(\"' . $segment_2_jw_key . '\");playerInstance.setup({ file: \"//content.jwplatform.com/videos/' . $segment_2_jw_key . '.aac\",image:\"http://www.northlandoutdoors.com/files/2015/12/Northland-Outdoors-Logo_16x9.png\",});</script>';\r\n  update_post_meta($segment2_post_id, 'mvp_video_embed', $mvp_video_embed );\r\n  #Set embed meta on segment 3 post\r\n  $segment_3_jw_key = get_post_meta($post_id, 'segment_3_key', true);\r\n  $mvp_video_embed = '<script type=\"text/javascript\" src=\"http://content.jwplatform.com/players/' . $segment_3_jw_key . '-XmRneLwC.js\"></script>' . '<div id=\"' . $segment_3_jw_key . '\">Loading the player...</div><script type=\"text/javascript\"> var playerInstance = jwplayer(\"' . $segment_3_jw_key . '\");playerInstance.setup({ file: \"//content.jwplatform.com/videos/' . $segment_3_jw_key . '.aac\",image:\"http://www.northlandoutdoors.com/files/2015/12/Northland-Outdoors-Logo_16x9.png\",});</script>';\r\n  update_post_meta($segment3_post_id, 'mvp_video_embed', $mvp_video_embed );\r\n```"}}