olivero.post_update.php

Same filename and directory in other branches
  1. 10 core/themes/olivero/olivero.post_update.php
  2. 11.x core/themes/olivero/olivero.post_update.php

Post update functions for Olivero.

File

core/themes/olivero/olivero.post_update.php

View source
<?php


/**
 * @file
 * Post update functions for Olivero.
 */


/**
 * Implements hook_removed_post_updates().
 */
function olivero_removed_post_updates() : array {
  return [
    'olivero_post_update_add_olivero_primary_color' => '11.0.0',
  ];
}

/**
 * Remove shortcut settings if shortcut module is not installed.
 */
function olivero_post_update_remove_shortcut_settings_if_not_installed() : void {
  $settings = \Drupal::configFactory()->getEditable('olivero.settings');
  $settings->clear('third_party_settings.shortcut')
    ->save();
  if (empty($settings->get('third_party_settings'))) {
    $settings->clear('third_party_settings')
      ->save();
  }
}

Functions

Title Deprecated Summary
olivero_post_update_remove_shortcut_settings_if_not_installed Remove shortcut settings if shortcut module is not installed.
olivero_removed_post_updates Implements hook_removed_post_updates().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.