This is a test. The current time on the server is: " . date( 'H:i:s' ) . "

"; $text = ob_get_contents(); ob_end_clean(); if ( $cachedata === 0 ) // called directly from the theme so store the output define( 'DYNAMIC_OB_TEXT', $text ); else // called via the wpsc_cachedata filter. We only get here in cached pages in wp-cache-phase1.php return str_replace( DYNAMIC_OUTPUT_BUFFER_TAG, $text, $cachedata ); } add_cacheaction( 'wpsc_cachedata', 'dynamic_output_buffer_test' ); function dynamic_output_buffer_test_safety( $safety ) { if ( defined( 'DYNAMIC_OB_TEXT' ) ) return 1; // ready to replace tag with dynamic content. else return 0; // tag cannot be replaced. } add_cacheaction( 'wpsc_cachedata_safety', 'dynamic_output_buffer_test_safety' ); function dynamic_cache_test_filter( &$cachedata) { return str_replace( DYNAMIC_CACHE_TEST_TAG, "", $cachedata ); } add_cacheaction( 'wpsc_cachedata', 'dynamic_cache_test_filter' ); function dynamic_cache_test_template_tag() { echo DYNAMIC_CACHE_TEST_TAG; // This is the template tag } function dynamic_cache_test_init() { add_action( 'wp_footer', 'dynamic_cache_test_template_tag' ); } add_cacheaction( 'add_cacheaction', 'dynamic_cache_test_init' ); */ ?>