Skip to content

Instantly share code, notes, and snippets.

View agentolivia's full-sized avatar

Amber Matz agentolivia

  • OsioLabs / Drupalize.Me
  • Beaverton, OR
View GitHub Profile
@eojthebrave
eojthebrave / entity_fields.php
Created July 1, 2021 14:54
Output a CSV file listing all fields and properties for Drupal 7 entity types to help prepare for a migration.
<?php
/**
* @file
* Create a CSV file with fields for every Drupal 7 entity type / bundle.
*
* When preparing for a Drupal 7 to Drupal 8/9 migration it can be helpful to
* perform some initial content analysis. This script creates CSV files that
* can be imported into Google Sheets etc. to help with this analysis.
*
@mherchel
mherchel / gist:ba36d3979b392b1b51d7
Created August 28, 2014 16:37
Add level indicator css class to all menu items and menu links within Drupal theme
<?php
/*
* Add level indicator css class to all menu items and menu links.
*/
function THEME_menu_link(array $variables) {
$element = $variables['element'];
$sub_menu = '';
$element['#attributes']['class'][] = 'menu-item menu-item--level' . $element['#original_link']['depth'];
@agentolivia
agentolivia / panesandblocks.inc
Last active May 26, 2016 17:02 — forked from anonymous/gist:5745928
Example of CTools Style Plugin dot inc file.
<?php
/**
* Defines a style plugin
*
* - panesandblocks: corresponds to directory name of plugin
* - render pane: the suffix of the theme function for the pane (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_pane",
* the value of "render pane" is "panesandblocks_render_pane".
* - render region: the suffix of the theme function for the region (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_region",