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
{% set database_content = node.field_database_content.0.value %} | |
{% set javascript_library = 'ik_maps/map-database-' ~ database_content %} | |
{% set map_name = node.getTitle() %} | |
{{ attach_library(javascript_library) }} | |
<div id="{{ 'map-' ~ database_content }}" class="{{ 'map-database-' ~ database_content ~'__map' }}" data-map-name="{{ map_name ~ ' Map' }}"></div> |
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
# Example of application created with Authorization Code Flow and Implicit Flow | |
$settings['ik_constant_contact'] = [ | |
'client_id' => 'yourclientid', | |
'client_secret' => 'yourclientsecret', | |
'auth_type' => 'auth_code' | |
]; |
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\my_module\Plugin\migrate\process; | |
use \Drupal\Core\Database\Database; | |
use Drupal\migrate\MigrateExecutableInterface; | |
use Drupal\migrate\ProcessPluginBase; | |
use Drupal\migrate\Row; | |
/** | |
* Custom process plugin to set a proper moderation state based on what's current on the site |
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\your_module\Plugin\migrate\process; | |
use \Drupal\Core\Database\Database; | |
use \Drupal\file\Entity\File; | |
use \Drupal\media\Entity\Media; | |
use Drupal\migrate\MigrateExecutableInterface; | |
use Drupal\migrate\ProcessPluginBase; | |
use Drupal\migrate\Row; | |
use Drupal\paragraphs\Entity\Paragraph; |
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\your_module\Plugin\migrate\source; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\migrate\Row; | |
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity; | |
/** | |
* Processes Scald Media items to Drupal 8 Media entities. | |
* |
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
/** | |
* Loads the outline image and draws it on the canvas. | |
*/ | |
_loadImage = () => { | |
const image = new Image() | |
const context = this.canvas.getContext('2d') | |
context.clearRect(0, 0, this.canvasWidth, this.canvasHeight) | |
image.onload = () => { |
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
UPDATE `wp_options` SET `option_value` = REPLACE (`option_value`,'http://old/url', 'http://new/url') WHERE `option_value` LIKE '%http://old/url%'; | |
UPDATE `wp_postmeta` SET `meta_value` = REPLACE (`meta_value`,'http://old/url', 'http://new/url') WHERE `meta_value` LIKE '%http://old/url%'; | |
UPDATE `wp_posts` SET `post_content` = REPLACE (`post_content`,'http://old/url', 'http://new/url') WHERE `post_content` LIKE '%http://old/url%'; | |
/* WP Gallery Plugin */ | |
delimiter // | |
DROP PROCEDURE IF EXISTS update_wp_gallery_slides; | |
CREATE PROCEDURE update_wp_gallery_slides() | |
BEGIN | |
IF EXISTS (SELECT * FROM `wp_gallery_slides`) THEN |