-
Notifications
You must be signed in to change notification settings - Fork 33
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
translate.w.org social icons aren't on the same line #78
Comments
wp-container-{hash}
styles weren't being output, but that was fixed by f5835d2
That is happening because:
I suspect the I'm thinking of doing something like the following, but it's obviously a fragile hack. global $wp_filter;
foreach ( $wp_filter['wp_footer'][10] as $callback ) {
$reflected = new \ReflectionFunction( $callback['function'] );
$is_layout_file = false !== strpos( $reflected->getFileName(), 'block-supports/layout.php' );
$has_style_variable = isset( $reflected->getStaticVariables()['style'] );
if ( $is_layout_file && $has_style_variable ) {
add_action( 'gp_footer', $callback );
}
} @ryelle , @dd32, @ocean90 : Do any of y'all see a better way? |
Another aspect of this is that GlotPress doesn't accept that scripts/styles might be printed in the footer (Which might be why view.min.js isn't loading?) as it only adds head-related hooks . At least on WordPress.org, I think the solution is to drop the GlotPress header/footer calls, and hook them to the WordPress actions instead. It would mean some hackery, but I feel like it's likely to be less hackery than the above. |
Yeah, that does sound better. I think it might also help to create a blank/empty theme, and activate that on translate.w.org, so that TwentyFifteen scripts/styles aren't enqueued. I'll play around w/ all that. |
The block now only calls `wp_head|footer()`, and isn't aware of GlotPress, so these templates need to load things that are unique to GlotPress. See WordPress/wporg-mu-plugins#78 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11435 74240141-8908-4e6f-9713-ba540dce6ec7
We'll probably need to revert part of those two commits, and move I guess the footer could still be in GlotPress templates, but then it wouldn't be consistent 🤷🏻 We also had to re-enable TwentyFifteen for the current site, so that will need to be addressed. One option might just be to swap the theme when we launch the new header. |
That's because TwentyFifteen was reactivated, and its stylesheets are enqueued again. I'm working on it now. |
See WordPress/wporg-mu-plugins#78 and WordPress/wporg-mu-plugins@258bb5c git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11445 74240141-8908-4e6f-9713-ba540dce6ec7
this happened before because the
wp-container-{hash}
styles weren't being output, but that was fixed by f5835d2gp_head()
back inside<head>
wporg-main
working on old site, or flip during launch?The text was updated successfully, but these errors were encountered: