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
####################################################### | |
### nginx.conf site wp vhost include start | |
####################################################### | |
### | |
### deny crawlers without 403 response | |
### | |
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget) ) { | |
return 444; | |
} |
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 | |
class MyMigration extends Migration { | |
public $base_dir; | |
/** | |
* Constructor. | |
*/ | |
public function __construct() { | |
parent::__construct(); |
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 | |
function CUSTOMMODULE_commerce_cart_product_add($order, $product, $quantity, $line_item) { | |
if (!empty($product->field_bundled_products)) { | |
$ids = array(); | |
foreach($product->field_bundled_products[LANGUAGE_NONE] as $bundle) { | |
$ids[] = $bundle['value']; | |
} | |
$line_item->data['bundled'] = array(); | |
$bundles = entity_load('field_collection_item', $ids); |