This file contains hidden or 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
| example: | |
| css: | |
| theme: | |
| css/example.css: {} | |
| js: | |
| js/example.js: {} |
This file contains hidden or 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
| <?php | |
| function redis_set() { | |
| $backend = new Redis_Cache('cache_sweepstakes'); | |
| $backend->set('sweepstakes:63:1', 100, CACHE_PERMANENT); | |
| dpm($backend); | |
| return ''; | |
| } |
This file contains hidden or 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
| <?php | |
| function axelerant_custom_username_form($form, &$form_state) { | |
| $default_user = user_load(3); | |
| $form['name'] = array( | |
| '#type' => 'textfield', | |
| '#title' => t('Search for Contributor'), | |
| '#autocomplete_path' => 'user/autocomplete', | |
| '#default_value' => $default_user->name, |
This file contains hidden or 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
| <?php | |
| // Line - 1811 - under "panels_get_pane_links_alter" | |
| // remove the prefix block- to get the name. | |
| $name_of_block = ltrim( $prefixed_name, $subtype_prefix_hyphen); | |
| // correct Method | |
| if (substr($prefixed_name, 0, strlen($subtype_prefix_hyphen)) == $subtype_prefix_hyphen) { | |
| $name_of_block = substr($prefixed_name, strlen($subtype_prefix_hyphen)); | |
| } |
This file contains hidden or 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
| (function ($) { | |
| Drupal.fooModule = Drupal.enrich || {}; | |
| Drupal.fooModule.copyToTextarea = function($field, $value, settings) { | |
| for (var editor in settings.wysiwyg.configs) break; | |
| $("textarea[name^='"+ $field +"']").val($.trim($value)); | |
| var editorid = $("textarea[name^='"+ $field +"'].text-full").attr('id'); | |
| if (typeof editorid != 'undefined' && editorid.length > 0) { | |
| if (editor == 'tinymce') { | |
| tinyMCE.execInstanceCommand(editorid, 'mceSetContent', false, $.trim(html)); |
This file contains hidden or 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
| (function ($) { | |
| Drupal.fooModule = Drupal.fooModule || {}; | |
| Drupal.fooModule.success = function (response, status) { | |
| // do some cusotm coding if needed. | |
| // Call original method with main functionality. | |
| Drupal.ajax.prototype.success.call(this, response, status); | |
| }; | |
| Drupal.behaviors.fooModule = { |
This file contains hidden or 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_user_operations(). | |
| */ | |
| function custom_users_user_operations() { | |
| $operations['custom_users_salesforce'] = array( | |
| 'label' => t('Create Salesforce Account'), | |
| 'callback' => 'custom_users_operations_create_salesforce_callback', | |
| ); | |
| return $operations; | |
| } |
This file contains hidden or 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_query_alter(). | |
| */ | |
| function evosys_redirect_query_alter($query) { | |
| if ($query->hasTag('debug')) { | |
| $sql = (string)$query; | |
| $connection = Database::getConnection(); | |
| foreach ((array) $query->arguments() as $key => $val) { | |
| $quoted[$key] = $connection->quote($val); | |
| } |
This file contains hidden or 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
| <?php | |
| function foo_update_path() { | |
| $nid = 1; | |
| $node = node_load($nid); | |
| foo_custom_module($node); | |
| exit; | |
| } | |
| function foo_custom_module($node) { |
This file contains hidden or 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
| <?php | |
| /** | |
| * Implements hook_Cron_queue_info(). | |
| */ | |
| function foo_cron_queue_info() { | |
| $queues['vehicle_new_queue'] = array( | |
| 'worker callback' => 'vehicle_new_queue_run', | |
| 'time' => 60, | |
| ); |