$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
| const jwt = require("jsonwebtoken"); | |
| /** | |
| * Check JWT | |
| */ | |
| function checkJWT(options) { | |
| return (request, response, next) => { | |
| // Check for paths to ignore | |
| if (options.unless.includes(request.path)) return next(); |
| -- Options | |
| UPDATE wp_options SET option_value = REPLACE(option_value, "http", "https") WHERE option_name = "siteurl" OR option_name = "home" AND option_value NOT LIKE "https%"; | |
| -- Posts | |
| UPDATE wp_posts SET guid = REPLACE(guid, "http", "https") WHERE guid NOT LIKE "https%"; |