Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix links array structure #96

Merged
merged 5 commits into from
Dec 20, 2023
Merged

Conversation

darrenoh
Copy link
Contributor

No description provided.

src/functions/theme.php Outdated Show resolved Hide resolved
@mglaman
Copy link
Collaborator

mglaman commented Nov 14, 2023

Actually, I also forgot about this:

            if (method_exists(HookPreprocess::class, $theme_hook)) {
                $cache[$theme_hook]['preprocess functions'][] = HookPreprocess::class . '::' . $theme_hook;
            }

So we can move the function into that class.

@darrenoh
Copy link
Contributor Author

darrenoh commented Nov 14, 2023

I'm having second thoughts about using a preprocess function on HookPreprocess. I don't want to modify every links array, just those that Drupal 7 modules pass to the theme() function. I think HookPreprocess should be used to modify variables going from Drupal 10 to Drupal 7 themes.

@darrenoh darrenoh force-pushed the fix-theme-links branch 2 times, most recently from 9852e74 to 9ec473c Compare November 22, 2023 21:23
@mglaman mglaman merged commit db32c4b into retrofit-drupal:main Dec 20, 2023
3 checks passed
@darrenoh darrenoh deleted the fix-theme-links branch December 20, 2023 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants