Skip to content

Instantly share code, notes, and snippets.

View mec's full-sized avatar

Meyric Rawlings mec

  • London, UK
  • 18:15 (UTC +01:00)
View GitHub Profile
@juampynr
juampynr / mymodule.info
Last active June 9, 2023 21:53
Drupal 7 Views 3 custom field handler
dependencies[] = ctools
; Views Handlers
files[] = views/mymodule_handler_handlername.inc
@BBGuy
BBGuy / i18n_get_menu.php
Created November 28, 2012 13:41
Drupal - Build a localized menu programmatically using i18n menu
<?php
function i18n_get_menu_get_localized_menu($menu_name) {
// Get the menu tree
$menu_links = menu_tree($menu_name);
// reform the array to be i18n_menu compatible
$l_menu_links = array();
foreach ($menu_links as $key => $value) {
$l_menu_links[$key]['link'] = $value['#original_link'];
}
// localize the menu
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: