- πΊπΈUnited States bluegeek9
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.
At function styles_default_presets() in styles.module, styles retrieved from hooks by other modules are merged using:
$styles[$field_type]['containers'] = array_merge($containers, $styles[$field_type]['containers']);
I think it would be better to use
array_recursive_merge()
so that some modules can add styles to other modules.
I've been trying to add some presets to media_youtube, so that I'm able to change size of the embedded player. To do so without patching media_youtube, I've hooked
hook_styles_default_presets()
in a module of mine and add some presets to media_youtube container.
The problem is that my container overrides completely media_youtube's, but I'd like them to merge. I thought about using
hook_styles_default_presets_alter()
but I would need to update data from 'styles_preset_instances' table.
It looks far easier just to make this change.
Thank you for your good work.
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.