Viewing 3 replies - 1 through 3 (of 3 total)
  • It could be the 3rd party encryption burner for me. But I’ve still a problem to insert it in ‘wp document revisions’. Like Ben Balter has told and even followed your instructions for 3rd party tools of ‘WP-Document-Revisions-Code-Cookbook-master‘ I wrote

    <?php 
    
    function wpdr_encrypt( $attachment ) {
    
            //get path to attached file
            $file = get_attached_file( $attachment->ID );
    
         if(class_exists('GDS_Encryption_Class'))
    {
        GDS_Encryption_Class::encrypt( $file );
    }
    
    }
    
    add_action( 'document_upload', 'wpdr_encrypt' );
    
    function wpdr_decrypt( $file ) {
    
         if(class_exists('GDS_Encryption_Class'))
    {
        GDS_Encryption_Class::decrypt($file);
    }
    
    }
    
    add_action( 'serve_document', 'wpdr_decrypt' );
    
    ?>

    but no encryption happened. Your tool works properly in the test modus. Plug In ‘WP Document Revisions – State Permission Code Sample’ is installed and activated, but saved documents are always in undecryption forms.
    I’m using wp 3.6.1, theme:theCorporation from elegant themes.

    Many thanks for helping in advance.

    Thread Starter Gravitate

    (@gravitate)

    $file = get_attached_file( $attachment->ID );
    This only returns the Path of the File not the file contents.
    So you will need to get the file contents then encrypt it. Not sure if you need to return the value or [Re-save] the file with the new contents.
    The Documentation you linked to doesn’t specify.

    function wpdr_decrypt( $file )
    This functions argument will also just be the file path.
    Unfortunately the documentation you provided doesn’t describe much about how the data is returned to the main class. Seems like these functions should be returning the values, but I am not sure. You may need to contact the plugin creator.

    Thank you for answering. I’ll keep looking forward..

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Gravitate Encryption] Need Encryption for WordPress or Gravity Forms?’ is closed to new replies.