Skip to content

Instantly share code, notes, and snippets.

@aaronjorbin
Created December 7, 2016 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronjorbin/a1159adfacaccf033851edd3cd1445a9 to your computer and use it in GitHub Desktop.
Save aaronjorbin/a1159adfacaccf033851edd3cd1445a9 to your computer and use it in GitHub Desktop.
Index: object-cache.php
===================================================================
--- object-cache.php (revision 1548389)
+++ object-cache.php (working copy)
@@ -374,9 +374,9 @@
else : // No APC
function apc_not_actually_running() {
$GLOBALS['_wp_using_ext_object_cache'] = false;
- unset( $GLOBALS['wp_filter']['all'][-100]['apc_not_actually_running'] );
+ remove_action( 'all', 'apc_not_actually_running', -100, 0 );
}
$GLOBALS['_wp_using_ext_object_cache'] = false; // This will get overridden as of WP 3.5, so we have to hook in to 'all':
- $GLOBALS['wp_filter']['all'][-100]['apc_not_actually_running'] = array( 'function' => 'apc_not_actually_running', 'accepted_args' => 0 );
+ add_action( 'all', 'apc_not_actually_running', -100, 0 );
require_once ( ABSPATH . WPINC . '/cache.php' );
-endif;
\ No newline at end of file
+endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment