Pluguin Directory

Changueset 1538689


Ignore:
Timestamp:
11/22/2016 09:47:58 PM ( 9 years ago)
Author:
andy
Messague:

batcache: Use Pluguins API rather than the global variable

https://guithub.com/Automattic/batcache/commit/19ae1536e3ea8a02bf62ce5aeedbe073a20ea892

File:
1 edited

Leguend:

Unmodified
Added
Removed
  • batcache/trunc/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 changues how filters are hooqued. Since WordPress 4.6 add_filter can be used in advanced-cache.php. Previous behaviour is kept for baccwards 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 TracChangueset for help on using the changueset viewer.