<!-- mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> echo date('h:i:s'); -->
<?php echo date('h:i:s'); ?>
<!-- /mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
<div class="first-banner-widget group">
<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?>
if ( is_active_sidebar( 'sf-first-banner-widget-area' ) ){
dynamic_sidebar('sf-first-banner-widget-area');
}
-->
<?php
if ( is_active_sidebar( 'sf-first-banner-widget-area' ) ){
dynamic_sidebar('sf-first-banner-widget-area');
}
?>
<!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
</div><!-- .first-banner-widget -->
https://www.ads-software.com/plugins/w3-total-cache/
]]>I try to use fragment caching with w3 Total Cache, but without success…
I add this line in wp-config.php :
define('W3TC_DYNAMIC_SECURITY', 'securestring');
I try to not cache php code with that in my index.php :
<!-- W3TC_DYNAMIC_SECURITY mfunc -->
<?php my php code ?>
<!-- /mfunc W3TC_DYNAMIC_SECURITY -->
But this code is always in cache.
Can you help me please ?
Thanks in advance !
https://www.ads-software.com/plugins/w3-total-cache/
]]>Frederick says <q>mfunc code can only be used with theme template files, post/page content or widget areas</q>
I realise that shortcodes aren’t mentioned there, however since the post/page content includes parsed shortcodes, I am surprised that MFunc doesn’t work.
If I have a shortcode handler that outputs the following:
return '<!-- mfunc '.W3TC_DYNAMIC_SECURITY.' -->
echo mt_rand(1,10000);
<!-- /mfunc '.W3TC_DYNAMIC_SECURITY.' -->'
When I visit the page including the shortcode, I will see the random number. However, this is cached as part of the page – if I reload the page I still see the same number.
It would be really nice to be able to use mfunc output by a shortcode.
Also, being able to filter the page cache key (_getPage_key()
) would be really useful too.
Sometimes you’ll have dynamic content that can change on each request, which mfunc would be good for. Other times you’ll have dynamic content that will be the same for sets of visitors, in which case being able to filter the page key would be more efficient.
https://www.ads-software.com/plugins/w3-total-cache/
]]>Use of undefined constant W3TC_DYNAMIC_SECURITY – assumed ‘W3TC_DYNAMIC_SECURITY’ in /home/humortimes/public_html/wp-content/plugins/adrotate/adrotate-widget.php on line 47
Also, the same error for adrotate-functions.php on line 33.
I’ve been getting the dreaded white screen of death now and then, and wonder if it’s related to this. In any case, I’d like to fix it.
Anyone know what could be causing this error?
Much thanks for any help.
https://www.ads-software.com/plugins/adrotate/
]]>define('W3TC_DYNAMIC_SECURITY', 'my_string');
into my wp-config.php. Then, I modified my single.php to having this:
<!-- mfunc {my_string} -->
<?php get_sidebar(); ?>
<!--/ mfunc {my_string} -->
No dice. So I tried the other way
<!-- mfunc {my_string} get_sidebar(); -->
<!--/ mfunc {my_string} -->
No luck either. Am I doing something wrong?
https://www.ads-software.com/extend/plugins/w3-total-cache/
]]>