commit f8acf3e592a690c599f68d76d1e51d7a67f5aa2b
Author: Julien Dubois <julien@happyculture.coop>
Date:   Tue Jun 21 17:39:45 2016 +0200

    Issue #1399990: Remove "Display author and date information" in Display Settings in favor of listing Author and Date in Manage Displays.

diff --git a/core/config/schema/core.data_types.schema.yml b/core/config/schema/core.data_types.schema.yml
index 73db361..43a3742 100644
--- a/core/config/schema/core.data_types.schema.yml
+++ b/core/config/schema/core.data_types.schema.yml
@@ -181,9 +181,6 @@ theme_settings:
         name:
           type: boolean
           label: 'Site name'
-        node_user_picture:
-          type: boolean
-          label: 'User pictures in posts'
         slogan:
           type: boolean
           label: 'Site slogan'
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 3fd6b0a..3c5283f 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -105,7 +105,6 @@ function _system_default_theme_features() {
   return array(
     'favicon',
     'logo',
-    'node_user_picture',
     'comment_user_picture',
     'comment_user_verification',
   );
diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php
index 8c573bb..0b93509 100644
--- a/core/lib/Drupal/Core/Extension/ThemeHandler.php
+++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php
@@ -20,7 +20,6 @@ class ThemeHandler implements ThemeHandlerInterface {
   protected $defaultFeatures = array(
     'favicon',
     'logo',
-    'node_user_picture',
     'comment_user_picture',
     'comment_user_verification',
   );
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index aade3e8..304fd96 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -575,10 +575,6 @@ function template_preprocess_node(&$variables) {
   $variables['node'] = $variables['elements']['#node'];
   /** @var \Drupal\node\NodeInterface $node */
   $node = $variables['node'];
-  $variables['date'] = drupal_render($variables['elements']['created']);
-  unset($variables['elements']['created']);
-  $variables['author_name'] = drupal_render($variables['elements']['uid']);
-  unset($variables['elements']['uid']);
 
   $variables['url'] = $node->url('canonical', array(
     'language' => $node->language(),
@@ -600,15 +596,6 @@ function template_preprocess_node(&$variables) {
   $node_type = $node->type->entity;
   // Used by RDF to add attributes around the author and date submitted.
   $variables['author_attributes'] = new Attribute();
-  $variables['display_submitted'] = $node_type->displaySubmitted();
-  if ($variables['display_submitted']) {
-    if (theme_get_setting('features.node_user_picture')) {
-      // To change user picture settings (e.g. image style), edit the 'compact'
-      // view mode on the User entity. Note that the 'compact' view mode might
-      // not be configured, so remember to always check the theme setting first.
-      $variables['author_picture'] = user_view($node->getOwner(), 'compact');
-    }
-  }
 
   // Add article ARIA role.
   $variables['attributes']['role'] = 'article';
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index 51794be..dbcab09 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -398,9 +398,12 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setDefaultValueCallback('Drupal\node\Entity\Node::getCurrentUserId')
       ->setTranslatable(TRUE)
       ->setDisplayOptions('view', array(
-        'label' => 'hidden',
-        'type' => 'author',
-        'weight' => 0,
+        'label' => 'above',
+        'type' => 'entity_reference_label',
+        'weight' => -2,
+        'settings' => array(
+          'link' => TRUE,
+        ),
       ))
       ->setDisplayOptions('form', array(
         'type' => 'entity_reference_autocomplete',
@@ -411,6 +414,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
           'placeholder' => '',
         ),
       ))
+      ->setDisplayConfigurable('view', TRUE)
       ->setDisplayConfigurable('form', TRUE);
 
     $fields['status'] = BaseFieldDefinition::create('boolean')
@@ -428,12 +432,18 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setDisplayOptions('view', array(
         'label' => 'hidden',
         'type' => 'timestamp',
-        'weight' => 0,
+        'weight' => -3,
+        'settings' => array(
+          'format_type' => 'medium',
+          'custom_date_format' => '',
+          'timezone' => '',
+        ),
       ))
       ->setDisplayOptions('form', array(
         'type' => 'datetime_timestamp',
         'weight' => 10,
       ))
+      ->setDisplayConfigurable('view', TRUE)
       ->setDisplayConfigurable('form', TRUE);
 
     $fields['changed'] = BaseFieldDefinition::create('changed')
diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php
index d5fb998..442a3fa 100644
--- a/core/modules/node/src/NodeTypeForm.php
+++ b/core/modules/node/src/NodeTypeForm.php
@@ -171,18 +171,6 @@ public function form(array $form, FormStateInterface $form_state) {
         '#default_value' => $language_configuration,
       );
     }
-    $form['display'] = array(
-      '#type' => 'details',
-      '#title' => t('Display settings'),
-      '#group' => 'additional_settings',
-    );
-    $form['display']['display_submitted'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Display author and date information'),
-      '#default_value' => $type->displaySubmitted(),
-      '#description' => t('Author username and publish date will be displayed.'),
-    );
-
     return $this->protectBundleIdElement($form);
   }
 
diff --git a/core/modules/node/src/NodeTypeInterface.php b/core/modules/node/src/NodeTypeInterface.php
index c034ffb..5162134 100644
--- a/core/modules/node/src/NodeTypeInterface.php
+++ b/core/modules/node/src/NodeTypeInterface.php
@@ -38,6 +38,8 @@ public function setNewRevision($new_revision);
    *
    * @return bool
    *   TRUE if the submitted by information should be shown.
+   *
+   * @deprecated in Drupal 8.2.x, will be removed before Drupal 9.0.
    */
   public function displaySubmitted();
 
@@ -46,6 +48,8 @@ public function displaySubmitted();
    *
    * @param bool $display_submitted
    *   TRUE if the submitted by information should be shown.
+   *
+   * @deprecated in Drupal 8.2.x, will be removed before Drupal 9.0.
    */
   public function setDisplaySubmitted($display_submitted);
 
diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig
index c7ada1e..4f69e8b 100644
--- a/core/modules/node/templates/node.html.twig
+++ b/core/modules/node/templates/node.html.twig
@@ -20,11 +20,9 @@
  *   or print a subset such as {{ content.field_example }}. Use
  *   {{ content|without('field_example') }} to temporarily suppress the printing
  *   of a given child element.
- * - author_picture: The node author user entity, rendered using the "compact"
- *   view mode.
  * - metadata: Metadata for this node.
- * - date: Themed creation date field.
- * - author_name: Themed author name field.
+ * - created: Themed creation date field.
+ * - uid: Themed author name field.
  * - url: Direct URL of the current node.
  * - display_submitted: Whether submission information should be displayed.
  * - attributes: HTML attributes for the containing element.
@@ -82,18 +80,9 @@
   {% endif %}
   {{ title_suffix }}
 
-  {% if display_submitted %}
-    <footer>
-      {{ author_picture }}
-      <div{{ author_attributes }}>
-        {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        {{ metadata }}
-      </div>
-    </footer>
-  {% endif %}
+  {{ metadata }}
 
   <div{{ content_attributes }}>
     {{ content }}
   </div>
-
 </article>
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 3108ee1..6ad869f 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -323,7 +323,7 @@ function rdf_preprocess_node(&$variables) {
 
   // Adds RDFa markup for the date.
   $created_mapping = $mapping->getPreparedFieldMapping('created');
-  if (!empty($created_mapping) && $variables['display_submitted']) {
+  if (!empty($created_mapping)) {
     $date_attributes = rdf_rdfa_attributes($created_mapping, $variables['node']->get('created')->first()->toArray());
     $rdf_metadata = array(
       '#theme' => 'rdf_metadata',
diff --git a/core/modules/statistics/tests/themes/statistics_test_attached/node.html.twig b/core/modules/statistics/tests/themes/statistics_test_attached/node.html.twig
index 03bb578..0c13f95 100644
--- a/core/modules/statistics/tests/themes/statistics_test_attached/node.html.twig
+++ b/core/modules/statistics/tests/themes/statistics_test_attached/node.html.twig
@@ -8,15 +8,7 @@
   {% endif %}
   {{ title_suffix }}
 
-  {% if display_submitted %}
-    <footer>
-      {{ author_picture }}
-      <div{{ author_attributes }}>
-        {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        {{ metadata }}
-      </div>
-    </footer>
-  {% endif %}
+  {{ metadata }}
 
   <div{{ content_attributes }}>
     {{ content.body }}
diff --git a/core/modules/system/config/install/system.theme.global.yml b/core/modules/system/config/install/system.theme.global.yml
index b8da423..b7d405d 100644
--- a/core/modules/system/config/install/system.theme.global.yml
+++ b/core/modules/system/config/install/system.theme.global.yml
@@ -7,7 +7,6 @@ features:
   comment_user_picture: true
   comment_user_verification: true
   favicon: true
-  node_user_picture: true
 logo:
   path: ''
   url: ''
diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php
index 068eb0a..ff64329 100644
--- a/core/modules/system/src/Form/ThemeSettingsForm.php
+++ b/core/modules/system/src/Form/ThemeSettingsForm.php
@@ -133,7 +133,6 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme =
 
     // Toggle settings
     $toggles = array(
-      'node_user_picture' => t('User pictures in posts'),
       'comment_user_picture' => t('User pictures in comments'),
       'comment_user_verification' => t('User verification status in comments'),
       'favicon' => t('Shortcut icon'),
diff --git a/core/modules/user/src/Tests/UserPictureTest.php b/core/modules/user/src/Tests/UserPictureTest.php
index 3f8db42..16864af 100644
--- a/core/modules/user/src/Tests/UserPictureTest.php
+++ b/core/modules/user/src/Tests/UserPictureTest.php
@@ -90,22 +90,14 @@ function testPictureOnNodeComment() {
 
     $node = $this->drupalCreateNode(array('type' => 'article'));
 
-    // Enable user pictures on nodes.
-    $this->config('system.theme.global')->set('features.node_user_picture', TRUE)->save();
-
+    // Get the user picture image style name.
     $image_style_id = $this->config('core.entity_view_display.user.user.compact')->get('content.user_picture.settings.image_style');
     $style = ImageStyle::load($image_style_id);
     $image_url = file_url_transform_relative($style->buildUrl($file->getfileUri()));
     $alt_text = 'Profile picture for user ' . $this->webUser->getUsername();
 
-    // Verify that the image is displayed on the node page.
-    $this->drupalGet('node/' . $node->id());
-    $elements = $this->cssSelect('.node__meta .field--name-user-picture img[alt="' . $alt_text . '"][src="' . $image_url . '"]');
-    $this->assertEqual(count($elements), 1, 'User picture with alt text found on node page.');
-
-    // Enable user pictures on comments, instead of nodes.
+    // Enable user pictures on comments.
     $this->config('system.theme.global')
-      ->set('features.node_user_picture', FALSE)
       ->set('features.comment_user_picture', TRUE)
       ->save();
 
@@ -116,9 +108,8 @@ function testPictureOnNodeComment() {
     $elements = $this->cssSelect('.comment__meta .field--name-user-picture img[alt="' . $alt_text . '"][src="' . $image_url . '"]');
     $this->assertEqual(count($elements), 1, 'User picture with alt text found on the comment.');
 
-    // Disable user pictures on comments and nodes.
+    // Disable user pictures on comments.
     $this->config('system.theme.global')
-      ->set('features.node_user_picture', FALSE)
       ->set('features.comment_user_picture', FALSE)
       ->save();
 
diff --git a/core/profiles/minimal/minimal.install b/core/profiles/minimal/minimal.install
index d30cb3b..6e9d65a 100644
--- a/core/profiles/minimal/minimal.install
+++ b/core/profiles/minimal/minimal.install
@@ -12,9 +12,6 @@
  * @see system_install()
  */
 function minimal_install() {
-  // Disable the user pictures on nodes.
-  \Drupal::configFactory()->getEditable('system.theme.global')->set('features.node_user_picture', FALSE)->save(TRUE);
-
   // Allow visitor account creation, but with administrative approval.
   \Drupal::configFactory()->getEditable('user.settings')->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save(TRUE);
 }
diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig
index b257ad3..847a48c 100644
--- a/core/themes/bartik/templates/node.html.twig
+++ b/core/themes/bartik/templates/node.html.twig
@@ -20,11 +20,9 @@
  *   or print a subset such as {{ content.field_example }}. Use
  *   {{ content|without('field_example') }} to temporarily suppress the printing
  *   of a given child element.
- * - author_picture: The node author user entity, rendered using the "compact"
- *   view mode.
  * - metadata: Metadata for this node.
- * - date: Themed creation date field.
- * - author_name: Themed author name field.
+ * - created: Themed creation date field.
+ * - uid: Themed author name field.
  * - url: Direct URL of the current node.
  * - display_submitted: Whether submission information should be displayed.
  * - attributes: HTML attributes for the containing element.
@@ -87,16 +85,10 @@
       </h2>
     {% endif %}
     {{ title_suffix }}
-    {% if display_submitted %}
-      <div class="node__meta">
-        {{ author_picture }}
-        <span{{ author_attributes }}>
-          {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        </span>
-        {{ metadata }}
-      </div>
-    {% endif %}
   </header>
+
+  {{ metadata }}
+
   <div{{ content_attributes.addClass('node__content', 'clearfix') }}>
     {{ content }}
   </div>
diff --git a/core/themes/classy/templates/content/node.html.twig b/core/themes/classy/templates/content/node.html.twig
index 7f99e79..c8c33c1 100644
--- a/core/themes/classy/templates/content/node.html.twig
+++ b/core/themes/classy/templates/content/node.html.twig
@@ -20,11 +20,9 @@
  *   or print a subset such as {{ content.field_example }}. Use
  *   {{ content|without('field_example') }} to temporarily suppress the printing
  *   of a given child element.
- * - author_picture: The node author user entity, rendered using the "compact"
- *   view mode.
  * - metadata: Metadata for this node.
- * - date: Themed creation date field.
- * - author_name: Themed author name field.
+ * - created: Themed creation date field.
+ * - uid: Themed author name field.
  * - url: Direct URL of the current node.
  * - display_submitted: Whether submission information should be displayed.
  * - attributes: HTML attributes for the containing element.
@@ -91,15 +89,7 @@
   {% endif %}
   {{ title_suffix }}
 
-  {% if display_submitted %}
-    <footer class="node__meta">
-      {{ author_picture }}
-      <div{{ author_attributes.addClass('node__submitted') }}>
-        {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        {{ metadata }}
-      </div>
-    </footer>
-  {% endif %}
+  {{ metadata }}
 
   <div{{ content_attributes.addClass('node__content') }}>
     {{ content }}
diff --git a/core/themes/stable/templates/content/node.html.twig b/core/themes/stable/templates/content/node.html.twig
index e9dcd0b..f6d1807 100644
--- a/core/themes/stable/templates/content/node.html.twig
+++ b/core/themes/stable/templates/content/node.html.twig
@@ -20,11 +20,9 @@
  *   or print a subset such as {{ content.field_example }}. Use
  *   {{ content|without('field_example') }} to temporarily suppress the printing
  *   of a given child element.
- * - author_picture: The node author user entity, rendered using the "compact"
- *   view mode.
  * - metadata: Metadata for this node.
- * - date: Themed creation date field.
- * - author_name: Themed author name field.
+ * - created: Themed creation date field.
+ * - uid: Themed author name field.
  * - url: Direct URL of the current node.
  * - display_submitted: Whether submission information should be displayed.
  * - attributes: HTML attributes for the containing element.
@@ -80,15 +78,7 @@
   {% endif %}
   {{ title_suffix }}
 
-  {% if display_submitted %}
-    <footer>
-      {{ author_picture }}
-      <div{{ author_attributes }}>
-        {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
-        {{ metadata }}
-      </div>
-    </footer>
-  {% endif %}
+  {{ metadata }}
 
   <div{{ content_attributes }}>
     {{ content }}
