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
/** | |
* Define the WordPress blogs to be imported. | |
*/ | |
function example_wordpress_migrate_wordpress_blogs() { | |
// Any key not set here will default to the values set in the | |
// $blog_default_settings variable in the drush command. | |
$blogs = array( | |
array( | |
'domain' => 'www.example.com/site-one/', | |
), |
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 | |
/** | |
* Migrate images into entities. | |
*/ | |
class ExampleImageMigration extends Migration { | |
/** | |
* {@inheritdoc} | |
*/ |
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 | |
/** | |
* Source Migration class for finding image tags in markup. | |
*/ | |
class ExampleMigrateSourceImage extends MigrateSource { | |
/** | |
* The string of HTML content. | |
*/ |
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
#!/bin/bash | |
migrate_loop() | |
{ | |
# Better readability with separation. | |
echo "========================"; | |
# Get the output of the drush status. | |
drush_output=$(drush ms "$1" --format string); | |
# Split output string into an 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 | |
namespace Drupal\chromatic_image\Plugin\Filter; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\Core\Entity\EntityTypeManagerInterface; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
use Drupal\Core\Render\RendererInterface; | |
use Drupal\filter\FilterProcessResult; | |
use Drupal\filter\Plugin\FilterBase; |
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
/** | |
* @file | |
* This gist supports the following article: | |
* https://chromatichq.com/insights/managing-large-menus-memory-usage-during-drupal-cache-clears | |
*/ | |
/** | |
* Converts menu content links to the new format that avoids the need to rebuild | |
* them during a cache rebuild. | |
* |