1 node.install node_update_1013()

Update the empty text, name, and menu link, for the admin content view.

Related topics

File

core/modules/node/node.install, line 1111
Install, update and uninstall functions for the node module.

Code

function node_update_1013() {
  $config = config('views.view.node_admin_content');
  // If human name has not be changed, update it.
  if ($config->get('human_name') == 'Admin Content') {
    $config->set('human_name', 'Administer content');
  }
  // If the node_admin_content view name has not been changed, update it.
  if ($config->get('display.default.display_options.title') == 'Admin Content') {
    $config->set('display.default.display_options.title', 'Content');
  }
  // If the empty text has not been changed, update it.
  if ($config->get('display.default.display_options.empty.content') == 'No content available.') {
    $config->set('display.default.display_options.empty.content', 'No content found.');
  }
  // If the menu item has not been changed, update it.
  if ($config->get('display.page.display_options.menu.title') == 'Find content') {
    $config->set('display.page.display_options.menu.title', 'Manage content');
  }
  $config->save();
  cache_clear_all();
}