Changeset 1538689
- Timestamp:
- 11/22/2016 09:47:58 PM (9 years ago)
- File:
-
- 1 edited
-
batcache/trunk/advanced-cache.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
batcache/trunk/advanced-cache.php
r1538688 r1538689 538 538 return; 539 539 540 $wp_filter['status_header'][10]['batcache'] = array( 'function' => array(&$batcache, 'status_header'), 'accepted_args' => 2 ); 541 $wp_filter['wp_redirect_status'][10]['batcache'] = array( 'function' => array(&$batcache, 'redirect_status'), 'accepted_args' => 2 ); 540 //WordPress 4.7 changes how filters are hooked. Since WordPress 4.6 add_filter can be used in advanced-cache.php. Previous behaviour is kept for backwards compatability with WP < 4.6 541 if ( function_exists( 'add_filter' ) ) { 542 add_filter( 'status_header', array( &$batcache, 'status_header' ), 10, 2 ); 543 add_filter( 'wp_redirect_status', array( &$batcache, 'redirect_status' ), 10, 2 ); 544 } else { 545 $wp_filter['status_header'][10]['batcache'] = array( 'function' => array(&$batcache, 'status_header'), 'accepted_args' => 2 ); 546 $wp_filter['wp_redirect_status'][10]['batcache'] = array( 'function' => array(&$batcache, 'redirect_status'), 'accepted_args' => 2 ); 547 } 542 548 543 549 ob_start(array(&$batcache, 'ob'));
Note: See TracChangeset
for help on using the changeset viewer.