From 18ad72f799d11aee0e2d16eee9b2f58f89835990 Mon Sep 17 00:00:00 2001 From: Koen Van den Wijngaert Date: Fri, 15 Jan 2016 11:19:37 +0100 Subject: [PATCH] Implements #45. --- wp-ffpc-acache.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wp-ffpc-acache.php b/wp-ffpc-acache.php index d871931..254fd26 100644 --- a/wp-ffpc-acache.php +++ b/wp-ffpc-acache.php @@ -439,6 +439,19 @@ function wp_ffpc_callback( $buffer ) { $to_store = substr_replace( $buffer, $insertion, $index, 0); } + /** + * Allows to edit the content to be stored in cache. + * + * This hooks allows the user to edit the page content right before it is about + * to be stored in the cache. This could be useful for alterations like + * minification. + * + * @since 1.10.2 + * + * @param string $to_store The content to be stored in cache. + */ + $to_store = apply_filters( 'wp-ffpc-to-store', $to_store ); + $prefix_meta = $wp_ffpc_backend->key ( $wp_ffpc_config['prefix_meta'] ); $wp_ffpc_backend->set ( $prefix_meta, $meta ); -- 2.46.2