all repos — wp-ffpc @ 8ab0a0d99a9170742fca9712b7c6f48f51497cb2

merge conflict fixed
Peter Molnar hello@petermolnar.eu
Fri, 15 Jan 2016 20:20:58 +0000
commit

8ab0a0d99a9170742fca9712b7c6f48f51497cb2

parent

32bd2f7b0e96be231214a6a163f2bb4a9644532d

1 files changed, 12 insertions(+), 6 deletions(-)

jump to
M wp-ffpc-acache.phpwp-ffpc-acache.php

@@ -457,12 +457,18 @@

$to_store = substr_replace( $buffer, $insertion, $index, 0); } - /* - if ( isset($wp_ffpc_config['relative_links']) && $wp_ffpc_config['relative_links'] == '1' ) { - $domain = parse_url(get_bloginfo('url'), PHP_URL_HOST); - $to_store = str_replace ( array("https://${domain}/", "http://${domain}/", "https://${domain}", "http://${domain}"), "/", $to_store); - } - */ + /** + * 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 );