$ terminus site:list
$ terminus site:list | rg 'filter'
| (function($, Drupal) { | |
| 'use strict'; | |
| Drupal.behaviors.nameOfBehavior = { | |
| attach: function (context, settings) { | |
| } | |
| }; |
| { "rules_on_node_publish" : { | |
| "LABEL" : "On node publish", | |
| "PLUGIN" : "reaction rule", | |
| "REQUIRES" : [ "rules" ], | |
| "ON" : [ "node_presave" ], | |
| "IF" : [ | |
| { "data_is" : { "data" : [ "node:status" ], "value" : "1" } }, | |
| { "AND" : [] }, | |
| { "data_is" : { "data" : [ "node-unchanged:status" ], "value" : "0" } } | |
| ], |
| /** | |
| * Implements hook_menu(). | |
| */ | |
| function mymodule_menu() { | |
| $items = array(); | |
| $items['admin/config/mymodule'] = array( | |
| 'title' => 'My configuration section', | |
| 'description' => 'This is the parent item', | |
| 'position' => 'left', | |
| 'weight' => -100, |
| <?php | |
| function yourmodule_views_post_build($view) { | |
| $view_name = 'the_id_of_the_view'; | |
| // The display ID of the main view display. | |
| $display_id = 'page_1'; | |
| if ($view->name == $view_name && $view->current_display == $display_id) { | |
| $current_page = $view->get_current_page(); | |
| // Hide the attachments on all pages beside the first one. |
$ terminus site:list
$ terminus site:list | rg 'filter'
| <?php | |
| function _mytheme_blocks_by_region($region) { | |
| $context_blocks = array(); | |
| $block_blocks = array(); | |
| // Blocks that are assigned to the region using Context | |
| if (function_exists('context_get_plugin') && $context = context_get_plugin('reaction', 'block')) { | |
| if ($context_block_list = $context->block_list($region)) { | |
| // Workaround the $context->block_get_blocks_by_region() issue. |
| <?php | |
| /** | |
| * Implements hook_theme_registry_alter(). | |
| */ | |
| function mymodule_theme_registry_alter(&$theme_registry) { | |
| // Defined path to the current module. | |
| $module_path = drupal_get_path('module', 'mymodule'); | |
| // Find all .tpl.php files in this module's folder recursively. | |
| $template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path); |
Undo last commit
$ git reset HEAD~1Same as above, but also leave the files staged
$ git reset --soft HEAD~1| 'use strict'; | |
| // Include Gulp | |
| var gulp = require('gulp'), | |
| // Include Plug-ins | |
| changed = require('gulp-changed'), | |
| concat = require('gulp-concat'), | |
| globbing = require('gulp-css-globbing'), | |
| imagemin = require('gulp-imagemin'), |