diff --git a/core/modules/field/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php b/core/modules/field/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
new file mode 100644
index 0000000..5b8eec1
--- /dev/null
+++ b/core/modules/field/modules/link/lib/Drupal/link/Plugin/field/widget/LinkWidget.php
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\link\Plugin\field\widget\LinkWidget.
+ */
+
+namespace Drupal\link\Plugin\field\widget;
+
+use Drupal\Core\Annotation\Plugin;
+use Drupal\Core\Annotation\Translation;
+use Drupal\field\Plugin\Type\Widget\WidgetBase;
+
+/**
+ * Plugin implementation of the 'link' widget.
+ *
+ * @Plugin(
+ *   id = "link",
+ *   module = "link",
+ *   label = @Translation("Link"),
+ *   field_types = {
+ *     "link"
+ *   }
+ * )
+ */
+class LinkWidget extends WidgetBase {
+
+  /**
+   * Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::formElement().
+   */
+  public function formElement(array $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
+    $settings = $this->instance['settings'];
+
+    $element['url'] = array(
+      '#type' => 'url',
+      '#title' => t('URL'),
+      '#default_value' => isset($items[$delta]['url']) ? $items[$delta]['url'] : NULL,
+      '#maxlength' => 2048,
+      '#required' => $element['#required'],
+    );
+    $element['title'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Title'),
+      '#default_value' => isset($items[$delta]['title']) ? $items[$delta]['title'] : NULL,
+      '#maxlength' => 255,
+      '#access' => $settings['title'] != DRUPAL_DISABLED,
+    );
+    // Post-process the title field to make it conditionally required if URL is
+    // non-empty. Omit the validation on the field edit form, since the field
+    // settings cannot be saved otherwise.
+    $is_field_edit_form = ($element['#entity'] === NULL);
+    if (!$is_field_edit_form && $settings['title'] == DRUPAL_REQUIRED) {
+      $element['#element_validate'][] = 'link_field_widget_validate_title';
+    }
+
+    // Exposing the attributes array in the widget is left for alternate and more
+    // advanced field widgets.
+    $element['attributes'] = array(
+      '#type' => 'value',
+      '#tree' => TRUE,
+      '#value' => !empty($items[$delta]['attributes']) ? $items[$delta]['attributes'] : array(),
+      '#attributes' => array('class' => array('link-field-widget-attributes')),
+    );
+
+    return $element;
+  }
+
+  /**
+   * Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::flagErrors().
+   */
+  public function flagErrors(EntityInterface $entity, $langcode, array $items, array $form, array &$form_state) {
+    parent::flagErrors($entity, $langcode, $items, $form, $form_state);
+
+    /*if ($element['url']['#value'] !== '' && $element['title']['#value'] === '') {
+      $element['title']['#required'] = TRUE;
+      form_error($element['title'], t('!name field is required.', array('!name' => $element['title']['#title'])));
+    }*/
+  }
+
+}
\ No newline at end of file
diff --git a/core/modules/field/modules/link/link.module b/core/modules/field/modules/link/link.module
index 947c2e9..7494093 100644
--- a/core/modules/field/modules/link/link.module
+++ b/core/modules/field/modules/link/link.module
@@ -91,57 +91,6 @@ function link_field_presave($entity_type, $entity, $field, $instance, $langcode,
 }
 
 /**
- * Implements hook_field_widget_info().
- */
-function link_field_widget_info() {
-  $widgets['link_default'] = array(
-    'label' => 'Link',
-    'field types' => array('link'),
-  );
-  return $widgets;
-}
-
-/**
- * Implements hook_field_widget_form().
- */
-function link_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
-  $settings = $instance['settings'];
-
-  $element['url'] = array(
-    '#type' => 'url',
-    '#title' => t('URL'),
-    '#default_value' => isset($items[$delta]['url']) ? $items[$delta]['url'] : NULL,
-    '#maxlength' => 2048,
-    '#required' => $element['#required'],
-  );
-  $element['title'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Title'),
-    '#default_value' => isset($items[$delta]['title']) ? $items[$delta]['title'] : NULL,
-    '#maxlength' => 255,
-    '#access' => $settings['title'] != DRUPAL_DISABLED,
-  );
-  // Post-process the title field to make it conditionally required if URL is
-  // non-empty. Omit the validation on the field edit form, since the field
-  // settings cannot be saved otherwise.
-  $is_field_edit_form = ($element['#entity'] === NULL);
-  if (!$is_field_edit_form && $settings['title'] == DRUPAL_REQUIRED) {
-    $element['#element_validate'][] = 'link_field_widget_validate_title';
-  }
-
-  // Exposing the attributes array in the widget is left for alternate and more
-  // advanced field widgets.
-  $element['attributes'] = array(
-    '#type' => 'value',
-    '#tree' => TRUE,
-    '#value' => !empty($items[$delta]['attributes']) ? $items[$delta]['attributes'] : array(),
-    '#attributes' => array('class' => array('link-field-widget-attributes')),
-  );
-
-  return $element;
-}
-
-/**
  * Form element validation handler for link_field_widget_form().
  *
  * Conditionally requires the link title if a URL value was filled in.
