Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #9145
      hughc
      Member

      I saw this post by @dameer :

      An old, old, old issue which wasn't fixed although promised to be

      And I think about the original issue that I had with Events Calendar Pro, and recurring events, and corrupted data.

      maybe_serialize & double-serialization of post_meta values

      What users need to be able to do is disable the transparent revisioning of post meta values, as required, as sometimes, piklist’s versioning is in conflict with other plugins trying to do the same thing; in the case of the Events Calendar, even with the latest code optimisation to do this by a raw sql query, metadata is duplicated, because the Events Calendar is performing an analogous action.

      remove_action('save_post', array('piklist_revision', 'save_post'), -1);

      is a brute-force way to disable it, globally, but what flow-on effects does this have on Piklist’s behaviour? There is scant documentation on this feature, it’s sitting in the background with the potential for conflict.

      Perhaps a filter to disable it on a per post type basis?

    • #9157
      Steve
      Keymaster

      I’ll look into the original revision ticket.

      However, if you want to disable on a per post basis you can do something like this (untested):

      
      add_action( 'wp_head', 'remove_my_action' );
      function remove_my_action(){
              global $post;
      
             if($post->ID == $id_I_want_to_disable) {
      
                remove_action( 'save_post', array( 'piklist_revision', 'save_post' ), -1 );
      
             }
      }
      
Viewing 1 reply thread
  • You must be logged in to reply to this topic.