You are here

function yoast_seo_update_8201 in Real-time SEO for Drupal 8.2

Remove the SEO status from the content overview.

File

./yoast_seo.install, line 14
Install, update, and uninstall functions for the Real-Time SEO module.

Code

function yoast_seo_update_8201() {
  $content_view = Views::getView('content');
  if ($content_view) {
    $display_id = 'page_1';
    $handlers = $content_view
      ->getHandlers('field', $display_id);
    if (isset($handlers['field_yoast_seo'])) {
      $content_view
        ->removeHandler($display_id, 'field', 'field_yoast_seo');
      $content_view
        ->save();
    }
  }
}