This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_uninstall(). | |
* | |
* Deletes the NUTS regions variables. | |
* Deletes the NUTS regions vocabulary (fields and data). | |
*/ | |
function nuts_regions_uninstall() { | |
$t = get_t(); | |
variable_del('clients'); | |
drupal_set_message($t('NUTS regions: NUTS regions was uninstalled from your site.')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Imports country flags. | |
$machine_name = 'EUCountries'; | |
migrate_static_registration(array($machine_name)); | |
$migration = Migration::getInstance($machine_name); | |
$migration->prepareUpdate(); | |
$result = $migration->processImport(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Deletes obsolete fields. | |
*/ | |
function generic_project_update_7000() { | |
$fields = array( | |
'field_gp_country', | |
'field_gp_description', | |
'field_gp_location', | |
'field_gp_project_manager', | |
'gp_project_manager', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Delete field | |
*/ | |
function mymodule_update_7000() { | |
$fields = array( | |
'field_myfield1', | |
'field_myfield2', | |
); | |
foreach ($fields as $field) { | |
if ($instance = field_info_instance('node', $field, 'page')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* UNLOCK the field provided so we can tweak settings. | |
*/ | |
function nexteuropa_map_update_7002() { | |
$field = field_read_field('map_layers'); | |
$field['locked'] = FALSE; | |
field_update_field($field); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Disable obsolete menu modules. | |
$modules = array('menu_token', 'menu_attributes'); | |
foreach ($modules as $module) { | |
if (module_exists($module)) { | |
module_disable(array($module), TRUE); | |
drupal_uninstall_modules(array($module)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/cnect/www/digital-agenda-dev/bin/phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt' modules/features/custom/cnect_ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create vocabulary and terms for Topic. | |
*/ | |
function _g2m_initiative_create_taxonomies() { | |
// Defines taxonomies to be created. | |
$taxonomies = array( | |
'g2m_topics' => array( | |
'name' => t('Topics'), | |
'terms' => array(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide annoying content | |
// @namespace hide-annoyance | |
// @version 0.1 | |
// @description Hide annoying content | |
// @author boris | |
// @match http*://*.europa.eu/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 dae.dev.europa.eu dae | |
127.0.0.1 dae1.dev.europa.eu dae1 | |
127.0.0.1 dae2.dev.europa.eu dae2 | |
127.0.0.1 platform.dev.europa.eu platform | |
127.0.0.1 d8.dev.europa.eu d8 | |
127.0.0.1 d7.dev.europa.eu d7 | |
127.0.0.1 .dev.europa.eu | |
127.0.0.1 dae3.dev.europa.eu dae3 | |
127.0.0.1 dae4.dev.europa.eu dae4 | |
127.0.0.1 dae5.dev.europa.eu dae5 |
OlderNewer