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
<?php | |
require_once __DIR__ . '/core/vendor/autoload.php'; | |
require_once __DIR__ . '/core/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE); | |
use Symfony\Component\Yaml\Parser; | |
$parser = new Parser(); | |
$yaml_files = file_scan_directory('./test_yaml', '/\.yml$/'); |
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
<?php | |
require_once __DIR__ . '/core/vendor/autoload.php'; | |
require_once __DIR__ . '/core/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE); | |
$yaml_files = file_scan_directory('./test_yaml', '/\.yml$/'); | |
$start = microtime(TRUE); | |
$yaml_contents = 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
<?php | |
require_once __DIR__ . '/core/vendor/autoload.php'; | |
require_once __DIR__ . '/core/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE); | |
$yaml_files = file_scan_directory('./test_yaml', '/\.yml$/'); | |
$start = microtime(TRUE); | |
$yaml_contents = 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
<?php | |
/** | |
* @file | |
* Contains constants and function wrappers for Drupal 7.x compatibility. | |
*/ | |
/** | |
* @defgroup drupal_compatibility Drupal compatibility layer. | |
* @{ | |
* These functions and classes are wrappers around Backdrop functions that allow |
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
<?php | |
/** | |
* Implements hook_mail_alter(). | |
*/ | |
function mymodule_mail_alter(&$message) { | |
if ($message['id'] == 'webform_submission') { | |
// Use the From header as a Reply-to and set the From header to the site | |
// mail address. Trying to say e-mail is "From" other domains will get the | |
// mail marked as spam, so instead the e-mail is always from webform.com, | |
// but the reply address is the user-specified address. |
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
# Server configuration for example.com | |
server { | |
# Require HTTP authentication. | |
#auth_basic "Restricted"; | |
#auth_basic_user_file /home/example/.htpasswd; | |
# Limit each user to 20 max connections. | |
limit_conn default 20; | |
# Set up ports and server address. |
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
/* All dropdown list items */ | |
#admin-bar .dropdown li { | |
background-image: none; | |
float: left; /* LTR */ | |
height: 100%; | |
list-style-image: none; | |
list-style-type: none; | |
margin: 0 !important; | |
padding: 0; |
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
<?php | |
/** | |
* Rename field_resource_thumbnail to field_reference_thumbnail. | |
*/ | |
function example_update_7001() { | |
_example_update_rename_field('field_resource_thumbnail', 'field_reference_thumbnail'); | |
_example_update_rename_field('field_resource_short_description', 'field_reference_description'); | |
} |
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
<?php | |
/** | |
* Build an EntityFieldQuery to get referencable entities. | |
*/ | |
protected function buildEntityFieldQuery($match = NULL, $match_operator = 'CONTAINS') { | |
$query = new EntityFieldQuery(); | |
$query->entityCondition('entity_type', $this->field['settings']['target_type']); | |
if (!empty($this->field['settings']['handler_settings']['target_bundles'])) { | |
$query->entityCondition('bundle', $this->field['settings']['handler_settings']['target_bundles'], 'IN'); | |
} |
OlderNewer