WordPress.org

Plugin Directory

Changeset 791210


Ignore:
Timestamp:
10/21/13 14:02:21 (6 months ago)
Author:
donncha
Message:

Added "wpsc_cachedata_safety" filter to allow plugins to make sure they're ready to run filter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-super-cache/trunk/wp-cache-phase2.php

    r789969 r791210  
    456456            if ( false == isset( $wp_super_cache_late_init ) || ( isset( $wp_super_cache_late_init ) && $wp_super_cache_late_init == 0 ) ) 
    457457                wp_cache_add_to_buffer( $buffer, 'Super Cache dynamic page detected but $wp_super_cache_late_init not set. See the readme.txt for further details.' ); 
    458             return do_cacheaction( 'wpsc_cachedata', $buffer ); // dynamic content for display 
     458            if ( do_cacheaction( 'wpsc_cachedata_safety', 0 ) === 1 ) 
     459                return do_cacheaction( 'wpsc_cachedata', $buffer ); // dynamic content for display 
    459460        } 
    460461 
     
    537538        } 
    538539        $wp_cache_meta[ 'dynamic' ] = true; 
    539         $buffer = do_cacheaction( 'wpsc_cachedata', $buffer ); // dynamic content for display 
     540        if ( do_cacheaction( 'wpsc_cachedata_safety', 0 ) === 1 ) 
     541            $buffer = do_cacheaction( 'wpsc_cachedata', $buffer ); // dynamic content for display 
    540542 
    541543        if ( $cache_compression && $wp_cache_gzip_encoding ) { 
Note: See TracChangeset for help on using the changeset viewer.