diff --git a/core/modules/breakpoint/breakpoint.info b/core/modules/breakpoint/breakpoint.info index fee160f..793bdcd 100644 --- a/core/modules/breakpoint/breakpoint.info +++ b/core/modules/breakpoint/breakpoint.info @@ -4,4 +4,3 @@ package = Core version = VERSION core = 8.x -dependencies[] = config diff --git a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php index 3feaf5d..c446333 100644 --- a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php +++ b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php @@ -2,14 +2,13 @@ /** * @file - * Definition of Drupal\picture\PictureFormController. + * Contains Drupal\picture\PictureFormController. */ namespace Drupal\picture; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityFormController; -use Drupal\picture\PictureMapping; /** * Form controller for the picture edit/add forms. diff --git a/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php b/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php index f63127d..343dbd3 100644 --- a/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php +++ b/core/modules/picture/lib/Drupal/picture/PictureMappingListController.php @@ -2,14 +2,13 @@ /** * @file - * Definition of Drupal\picture\PictureListController. + * Contains Drupal\picture\PictureListController. */ namespace Drupal\picture; use Drupal\Core\Config\Entity\ConfigEntityListController; use Drupal\Core\Entity\EntityInterface; -use Drupal\picture\PictureMapping; /** * Provides a listing of Pictures. diff --git a/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php b/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php index b44d8bf..2710303 100644 --- a/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php +++ b/core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php @@ -13,7 +13,7 @@ /** * Defines the Picture entity. - * + * * @Plugin( * id = "picture_mapping", * label = @Translation("Picture mapping"), @@ -106,7 +106,7 @@ public function createDuplicate() { } /** - * Load breakpoint group. + * Loads the breakpoint group. */ protected function loadBreakpointGroup() { if ($this->breakpointGroup) { @@ -116,7 +116,7 @@ protected function loadBreakpointGroup() { } /** - * Load all mappings, remove non-existing ones. + * Loads all mappings and removes non-existing ones. */ protected function loadAllMappings() { $loaded_mappings = $this->mappings; @@ -145,7 +145,7 @@ protected function loadAllMappings() { } /** - * Check if there's at least one mapping defined. + * Checks if there's at least one mapping defined. */ public function hasMappings() { $mapping_found = FALSE; diff --git a/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php b/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php index a4e8398..192f74c 100644 --- a/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php +++ b/core/modules/picture/lib/Drupal/picture/Plugin/field/formatter/PictureFormatter.php @@ -137,13 +137,12 @@ public function viewElements(EntityInterface $entity, $langcode, array $items) { // @todo add the following when breakpoint->status is added again: // $picture_mapping->breakpointGroup->breakpoints[$breakpoint_name]->status if (isset($picture_mapping->breakpointGroup->breakpoints[$breakpoint_name])) { - $breakpoint = $picture_mapping->breakpointGroup->breakpoints[$breakpoint_name]; + $breakpoint = $picture_mapping->breakpointGroup->breakpoints[$breakpoint_name]; - // Determine the enabled multipliers. - $multipliers = array_intersect_key($multipliers, $breakpoint->multipliers); + // Determine the enabled multipliers. + $multipliers = array_intersect_key($multipliers, $breakpoint->multipliers); foreach ($multipliers as $multiplier => $image_style) { // Make sure the multiplier still exists. - //if (!empty(array_intersect($multiplier, $breakpoint->multipliers))) { if (!empty($image_style)) { // First mapping found is used as fallback. if (empty($fallback_image_style)) { diff --git a/core/modules/picture/picture.info b/core/modules/picture/picture.info index 3113a7f..ab1ae54 100644 --- a/core/modules/picture/picture.info +++ b/core/modules/picture/picture.info @@ -1,9 +1,8 @@ name = Picture -description = Picture element +description = Picture element allows you to output responsive images using the new HTML5 picture tag. package = Core version = VERSION core = 8.x dependencies[] = breakpoint -dependencies[] = config dependencies[] = image configure = admin/config/media/picturemapping diff --git a/core/modules/picture/picture.module b/core/modules/picture/picture.module index 5d77db6..8cf9450 100644 --- a/core/modules/picture/picture.module +++ b/core/modules/picture/picture.module @@ -308,12 +308,12 @@ function theme_picture($variables) { } $output[] = ''; - // add source tags to the output. + // Add source tags to the output. foreach ($sources as $source) { $output[] = theme('picture_source', $source); } - // output the fallback image. + // Output the fallback image. $output[] = ''; $output[] = ''; return implode("\n", $output); diff --git a/core/modules/picture/picturefill/picturefill.js b/core/modules/picture/picturefill/picturefill.js index 8e4c231..8df8eb9 100644 --- a/core/modules/picture/picturefill/picturefill.js +++ b/core/modules/picture/picturefill/picturefill.js @@ -43,7 +43,7 @@ // See which sources match. for (var j = 0, jl = sources.length; j < jl; j++ ) { var media = sources[j].getAttribute('media'); - // if there's no media specified, OR w.matchMedia is supported + // If there's no media specified or the media query matches, add it. if (!media || (w.matchMedia && w.matchMedia(media).matches)) { matches.push(sources[j]); }