Advertisement
Guest User

Advanced Custom Fields Cache Replace

a guest
Mar 13th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. diff --git a/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php b/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php
  2. --- a/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php
  3. +++ b/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php
  4. @@ -501,6 +501,8 @@ class acf_field_functions
  5.         // filters
  6.         $field = apply_filters('acf/update_field/type=' . $field['type'], $field, $post_id ); // new filter
  7.        
  8. +       // set cache
  9. +       wp_cache_replace( 'load_field/key=' . $field['key'], $field, 'acf' );
  10.        
  11.         // save
  12.         update_post_meta( $post_id, $field['key'], $field );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement