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

Custom Fonts #4052

Closed
kprovance opened this issue Jan 16, 2025 · 0 comments
Closed

Custom Fonts #4052

kprovance opened this issue Jan 16, 2025 · 0 comments

Comments

@kprovance
Copy link
Member

From https://wordpress.org/support/topic/css-performance-improvement/

I noticed the redux-custom-fonts CSS file in wp-content/uploads/redux/custom-fonts/fonts.css?ver=1736987826 is being redownloaded by the browser on each page view due the version number changing every second (as it’s based off time).

Would it be possible to apply the patch below to the redux-core/inc/extensions/custom_fonts/class-redux-extension-custom-fonts.php file to improve the front-end performance for that request:

Replacing:

wp_enqueue_style(
	'redux-custom-fonts',
	$this->upload_url . 'fonts.css',
	array(),
	time();
)

with:

wp_enqueue_style(
	'redux-custom-fonts',
	$this->upload_url . 'fonts.css',
	array(),
	filemtime( $this->upload_dir . 'fonts.css' )
);
kprovance added a commit that referenced this issue Jan 17, 2025
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

No branches or pull requests

1 participant