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

Introduce an alternative to template_redirect for cache plugins #70

Closed
MathieuLamiot opened this issue May 13, 2024 · 3 comments
Closed

Comments

@MathieuLamiot
Copy link

Details to be added/discussed with @Tabrisrp

@remyperona
Copy link

There is an initiative in Gutenberg to add this to core: WordPress/gutenberg#61212

@MathieuLamiot
Copy link
Author

Thanks!
Is there any way we could contribute here? Maybe reviewing the PR on Gutenberg / testing it? Or maybe bridging the gap from the Gutenberg PR into WordPress core https://core.trac.wordpress.org/ticket/43258 as suggested in the comments of the PR?

 * This is a hack which would eventually be replaced with something like this in wp-includes/template-loader.php:
 *
 *          $template = apply_filters( 'template_include', $template );
 *     +    ob_start( 'wp_template_output_buffer_callback' );
 *          if ( $template ) {
 *              include $template;
 *          } elseif ( current_user_can( 'switch_themes' ) ) {
 *
 * @link https://core.trac.wordpress.org/ticket/43258

@MathieuLamiot
Copy link
Author

As discussed, not much to be doe here since it's already on-going with Gutenberg and people involved in WP Core. We'll keep an eye on this to eventually leverage it in WP Rocket once in WP Core.

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

2 participants