{"action":"created","comment":{"url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/comments/93451783","pull_request_review_id":13979554,"id":93451783,"diff_hunk":"@@ -0,0 +1,119 @@\n+<?php\n+/**\n+ * @file\n+ * Default theme functions.\n+ */\n+\n+/**\n+ * OM Maximenu content rendering engine override.\n+ */\n+function farnet_om_menu_content_render($content = array()) {\n+  global $_om_maximenu_block_classes;\n+  global $_om_maximenu_visible_blocks;\n+\n+  $visible_blocks = $_om_maximenu_visible_blocks;\n+\n+  $block_classes = !empty($_om_maximenu_block_classes) ? $_om_maximenu_block_classes : array();\n+\n+  $count = 0;\n+  uasort($content, 'om_sort_by_weight');\n+  $total = count($content);\n+  $out = '';\n+  foreach ($content as $key => $prop) {\n+    $count++;\n+\n+    $module     = $prop['module'];\n+    $delta      = $prop['delta'];\n+    $visibility = (isset($prop['visibility']) && ($prop['visibility'] == 1)) ? in_array($module . '__' . $delta, $visible_blocks) ? 1 : 0 : 1;\n+\n+    if ($visibility) {\n+      $title               = stripslashes(trim($prop['title']));\n+      $path                = ($prop['title_path'] == '<front>') ? '' : $prop['title_path'];\n+      $options             = [];\n+      $options['query']    = isset($prop['title_path_query']) ? om_path_query($prop['title_path_query']) : '';\n+      $options['fragment'] = isset($prop['title_path_fragment']) ? $prop['title_path_fragment'] : '';\n+      $block_title         = (!empty($prop['title_path'])) ? '<a href=\"' . url($path, $options) . '\" title=\"' . $title . '\">' . $title . '</a>' : $title;\n+\n+      $block               = module_invoke($module, 'block_view', $delta);\n+\n+      $om_classes = ($count == 1) ? ' first' : '';\n+\n+      if ($count == $total) {\n+        $om_classes .= ' last';\n+      }\n+\n+      $om_classes .= isset($block_classes[$module][$delta]) ? ' ' . $block_classes[$module][$delta] : '';\n+\n+      $om_classes .= ' fr-megamenu';\n+\n+      $out .= theme(\n+        'om_maximenu_content',\n+        [\n+          'block' => $block,\n+          'module' => $module,\n+          'delta' => $delta,\n+          'om_classes' => $om_classes,\n+          'title' => $title,\n+          'block_title' => $block_title,\n+        ]\n+      );\n+    }\n+  }\n+  return $out;\n+}\n+\n+/**\n+ * Implements hook_block_view_alter().\n+ */\n+function farnet_preprocess_block(&$vars) {\n+  $block_id = $vars['block']->module . '-' . $vars['block']->delta;\n+\n+  switch ($block_id) {\n+    case 'om_maximenu-om-maximenu-1':\n+      $vars['classes_array'][] = 'navigation-main';\n+      break;\n+\n+  }\n+}\n+\n+/**\n+ * Alter the main menu in order to add custom class.\n+ */\n+function farnet_menu_tree__main_menu($variables) {\n+  $navbar = '';\n+  if (strpos($variables['tree'], 'main-menu-top-level') !== FALSE) {\n+    $navbar = 'nav navbar-nav';\n+  }\n+\n+  return '<ul class=\"fr-megamenu-list menu clearfix ' . $navbar . '\">' . $variables['tree'] . '</ul>';\n+}\n+\n+/**\n+ * Returns HTML for a dropdown, modified version from ec_resp.\n+ */\n+function farnet_dropdown($variables) {\n+  $items = $variables['items'];\n+  $attributes = array();\n+  $output = \"\";\n+\n+  if (!empty($items)) {\n+    $output .= \"<ul class='dropdown-menu'>\";\n+    $num_items = count($items);\n+    foreach ($items as $i => $item) {","path":"lib/themes/farnet/template.php","position":null,"original_position":102,"commit_id":"f4fe67ef73a3af49fcac4d446cafd1baa170fc82","original_commit_id":"19df05835851052bfd11a033928eb7b3bb882e3f","user":{"login":"verbruggenalex","id":11474434,"avatar_url":"https://avatars.githubusercontent.com/u/11474434?v=3","gravatar_id":"","url":"https://api.github.com/users/verbruggenalex","html_url":"https://github.com/verbruggenalex","followers_url":"https://api.github.com/users/verbruggenalex/followers","following_url":"https://api.github.com/users/verbruggenalex/following{/other_user}","gists_url":"https://api.github.com/users/verbruggenalex/gists{/gist_id}","starred_url":"https://api.github.com/users/verbruggenalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verbruggenalex/subscriptions","organizations_url":"https://api.github.com/users/verbruggenalex/orgs","repos_url":"https://api.github.com/users/verbruggenalex/repos","events_url":"https://api.github.com/users/verbruggenalex/events{/privacy}","received_events_url":"https://api.github.com/users/verbruggenalex/received_events","type":"User","site_admin":false},"body":"Thx for fixing.","created_at":"2016-12-21T14:55:47Z","updated_at":"2016-12-21T14:55:47Z","html_url":"https://github.com/ec-europa/farnet-reference/pull/2#discussion_r93451783","pull_request_url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/comments/93451783"},"html":{"href":"https://github.com/ec-europa/farnet-reference/pull/2#discussion_r93451783"},"pull_request":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2","id":97986295,"html_url":"https://github.com/ec-europa/farnet-reference/pull/2","diff_url":"https://github.com/ec-europa/farnet-reference/pull/2.diff","patch_url":"https://github.com/ec-europa/farnet-reference/pull/2.patch","issue_url":"https://api.github.com/repos/ec-europa/farnet-reference/issues/2","number":2,"state":"open","locked":false,"title":"Release 1.0","user":{"login":"Sokarion","id":4623250,"avatar_url":"https://avatars.githubusercontent.com/u/4623250?v=3","gravatar_id":"","url":"https://api.github.com/users/Sokarion","html_url":"https://github.com/Sokarion","followers_url":"https://api.github.com/users/Sokarion/followers","following_url":"https://api.github.com/users/Sokarion/following{/other_user}","gists_url":"https://api.github.com/users/Sokarion/gists{/gist_id}","starred_url":"https://api.github.com/users/Sokarion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sokarion/subscriptions","organizations_url":"https://api.github.com/users/Sokarion/orgs","repos_url":"https://api.github.com/users/Sokarion/repos","events_url":"https://api.github.com/users/Sokarion/events{/privacy}","received_events_url":"https://api.github.com/users/Sokarion/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-14T16:26:23Z","updated_at":"2016-12-21T14:55:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a587e4bb45595df722e1082c7d9d2ea32cd5765","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ec-europa/farnet-reference/issues/2/comments","statuses_url":"https://api.github.com/repos/ec-europa/farnet-reference/statuses/f4fe67ef73a3af49fcac4d446cafd1baa170fc82","head":{"label":"bianchim:release-1.0","ref":"release-1.0","sha":"f4fe67ef73a3af49fcac4d446cafd1baa170fc82","user":{"login":"bianchim","id":19705314,"avatar_url":"https://avatars.githubusercontent.com/u/19705314?v=3","gravatar_id":"","url":"https://api.github.com/users/bianchim","html_url":"https://github.com/bianchim","followers_url":"https://api.github.com/users/bianchim/followers","following_url":"https://api.github.com/users/bianchim/following{/other_user}","gists_url":"https://api.github.com/users/bianchim/gists{/gist_id}","starred_url":"https://api.github.com/users/bianchim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bianchim/subscriptions","organizations_url":"https://api.github.com/users/bianchim/orgs","repos_url":"https://api.github.com/users/bianchim/repos","events_url":"https://api.github.com/users/bianchim/events{/privacy}","received_events_url":"https://api.github.com/users/bianchim/received_events","type":"User","site_admin":false},"repo":{"id":76453252,"name":"farnet-dev","full_name":"bianchim/farnet-dev","owner":{"login":"bianchim","id":19705314,"avatar_url":"https://avatars.githubusercontent.com/u/19705314?v=3","gravatar_id":"","url":"https://api.github.com/users/bianchim","html_url":"https://github.com/bianchim","followers_url":"https://api.github.com/users/bianchim/followers","following_url":"https://api.github.com/users/bianchim/following{/other_user}","gists_url":"https://api.github.com/users/bianchim/gists{/gist_id}","starred_url":"https://api.github.com/users/bianchim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bianchim/subscriptions","organizations_url":"https://api.github.com/users/bianchim/orgs","repos_url":"https://api.github.com/users/bianchim/repos","events_url":"https://api.github.com/users/bianchim/events{/privacy}","received_events_url":"https://api.github.com/users/bianchim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bianchim/farnet-dev","description":null,"fork":true,"url":"https://api.github.com/repos/bianchim/farnet-dev","forks_url":"https://api.github.com/repos/bianchim/farnet-dev/forks","keys_url":"https://api.github.com/repos/bianchim/farnet-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bianchim/farnet-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bianchim/farnet-dev/teams","hooks_url":"https://api.github.com/repos/bianchim/farnet-dev/hooks","issue_events_url":"https://api.github.com/repos/bianchim/farnet-dev/issues/events{/number}","events_url":"https://api.github.com/repos/bianchim/farnet-dev/events","assignees_url":"https://api.github.com/repos/bianchim/farnet-dev/assignees{/user}","branches_url":"https://api.github.com/repos/bianchim/farnet-dev/branches{/branch}","tags_url":"https://api.github.com/repos/bianchim/farnet-dev/tags","blobs_url":"https://api.github.com/repos/bianchim/farnet-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bianchim/farnet-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bianchim/farnet-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/bianchim/farnet-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bianchim/farnet-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/bianchim/farnet-dev/languages","stargazers_url":"https://api.github.com/repos/bianchim/farnet-dev/stargazers","contributors_url":"https://api.github.com/repos/bianchim/farnet-dev/contributors","subscribers_url":"https://api.github.com/repos/bianchim/farnet-dev/subscribers","subscription_url":"https://api.github.com/repos/bianchim/farnet-dev/subscription","commits_url":"https://api.github.com/repos/bianchim/farnet-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/bianchim/farnet-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/bianchim/farnet-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/bianchim/farnet-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/bianchim/farnet-dev/contents/{+path}","compare_url":"https://api.github.com/repos/bianchim/farnet-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bianchim/farnet-dev/merges","archive_url":"https://api.github.com/repos/bianchim/farnet-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bianchim/farnet-dev/downloads","issues_url":"https://api.github.com/repos/bianchim/farnet-dev/issues{/number}","pulls_url":"https://api.github.com/repos/bianchim/farnet-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/bianchim/farnet-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/bianchim/farnet-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bianchim/farnet-dev/labels{/name}","releases_url":"https://api.github.com/repos/bianchim/farnet-dev/releases{/id}","deployments_url":"https://api.github.com/repos/bianchim/farnet-dev/deployments","created_at":"2016-12-14T11:23:26Z","updated_at":"2016-12-14T11:23:48Z","pushed_at":"2016-12-21T14:00:15Z","git_url":"git://github.com/bianchim/farnet-dev.git","ssh_url":"git@github.com:bianchim/farnet-dev.git","clone_url":"https://github.com/bianchim/farnet-dev.git","svn_url":"https://github.com/bianchim/farnet-dev","homepage":null,"size":8537,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ec-europa:master","ref":"master","sha":"8250cb4b671767f2d83da7b05491ea1f95444c96","user":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"repo":{"id":58465136,"name":"farnet-reference","full_name":"ec-europa/farnet-reference","owner":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ec-europa/farnet-reference","description":null,"fork":false,"url":"https://api.github.com/repos/ec-europa/farnet-reference","forks_url":"https://api.github.com/repos/ec-europa/farnet-reference/forks","keys_url":"https://api.github.com/repos/ec-europa/farnet-reference/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ec-europa/farnet-reference/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ec-europa/farnet-reference/teams","hooks_url":"https://api.github.com/repos/ec-europa/farnet-reference/hooks","issue_events_url":"https://api.github.com/repos/ec-europa/farnet-reference/issues/events{/number}","events_url":"https://api.github.com/repos/ec-europa/farnet-reference/events","assignees_url":"https://api.github.com/repos/ec-europa/farnet-reference/assignees{/user}","branches_url":"https://api.github.com/repos/ec-europa/farnet-reference/branches{/branch}","tags_url":"https://api.github.com/repos/ec-europa/farnet-reference/tags","blobs_url":"https://api.github.com/repos/ec-europa/farnet-reference/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ec-europa/farnet-reference/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ec-europa/farnet-reference/git/refs{/sha}","trees_url":"https://api.github.com/repos/ec-europa/farnet-reference/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ec-europa/farnet-reference/statuses/{sha}","languages_url":"https://api.github.com/repos/ec-europa/farnet-reference/languages","stargazers_url":"https://api.github.com/repos/ec-europa/farnet-reference/stargazers","contributors_url":"https://api.github.com/repos/ec-europa/farnet-reference/contributors","subscribers_url":"https://api.github.com/repos/ec-europa/farnet-reference/subscribers","subscription_url":"https://api.github.com/repos/ec-europa/farnet-reference/subscription","commits_url":"https://api.github.com/repos/ec-europa/farnet-reference/commits{/sha}","git_commits_url":"https://api.github.com/repos/ec-europa/farnet-reference/git/commits{/sha}","comments_url":"https://api.github.com/repos/ec-europa/farnet-reference/comments{/number}","issue_comment_url":"https://api.github.com/repos/ec-europa/farnet-reference/issues/comments{/number}","contents_url":"https://api.github.com/repos/ec-europa/farnet-reference/contents/{+path}","compare_url":"https://api.github.com/repos/ec-europa/farnet-reference/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ec-europa/farnet-reference/merges","archive_url":"https://api.github.com/repos/ec-europa/farnet-reference/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ec-europa/farnet-reference/downloads","issues_url":"https://api.github.com/repos/ec-europa/farnet-reference/issues{/number}","pulls_url":"https://api.github.com/repos/ec-europa/farnet-reference/pulls{/number}","milestones_url":"https://api.github.com/repos/ec-europa/farnet-reference/milestones{/number}","notifications_url":"https://api.github.com/repos/ec-europa/farnet-reference/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ec-europa/farnet-reference/labels{/name}","releases_url":"https://api.github.com/repos/ec-europa/farnet-reference/releases{/id}","deployments_url":"https://api.github.com/repos/ec-europa/farnet-reference/deployments","created_at":"2016-05-10T13:49:02Z","updated_at":"2016-12-20T09:17:20Z","pushed_at":"2016-12-21T14:00:17Z","git_url":"git://github.com/ec-europa/farnet-reference.git","ssh_url":"git@github.com:ec-europa/farnet-reference.git","clone_url":"https://github.com/ec-europa/farnet-reference.git","svn_url":"https://github.com/ec-europa/farnet-reference","homepage":null,"size":156,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2"},"html":{"href":"https://github.com/ec-europa/farnet-reference/pull/2"},"issue":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/issues/2"},"comments":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ec-europa/farnet-reference/statuses/f4fe67ef73a3af49fcac4d446cafd1baa170fc82"}}}}
{"actor":{"display_login":"verbruggenalex"}}