Skip to content

Commit 518461e

Browse files
committed
Issue #6: Compatibility with latest Paragraphs release
Fixes #6
1 parent 02a1e98 commit 518461e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

classy_paragraphs.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ package = Paragraphs
66

77
dependencies[] = list
88
dependencies[] = options
9-
dependencies[] = paragraphs
9+
dependencies[] = paragraphs (>=1.2.0-alpha2)

classy_paragraphs.module

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ function classy_paragraphs_get_options($field, $instance) {
3535
*/
3636
function classy_paragraphs_preprocess_paragraphs_item(&$variables, $hook) {
3737
if ($hook == CLASSY_PARAGRAPHS_ENTITY_TYPE) {
38-
$paragraphs_item_id = element_children($variables['elements']['entity']['paragraphs_item']);
39-
$paragraphs_item_entity = paragraphs_item_load($paragraphs_item_id[0]);
38+
$paragraphs_item_entity = $variables['paragraphs_item'];
4039
$classes = classy_paragraphs_get_classes($paragraphs_item_entity);
4140
foreach ($classes as $class) {
42-
$variables['classes'][] = backdrop_html_class($class);
41+
$variables['classes_array'][] = backdrop_html_class($class);
4342
}
4443
}
4544
}

0 commit comments

Comments
 (0)