This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pda_after_un_protected', 'handle_after_unprotect_file' ); | |
function handle_after_unprotect_file( $attachment_id ) { | |
//Do something here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'pda_after_protected', 'handle_after_protect_file' ); | |
function handle_after_protect_file( $attachment_id ) { | |
//Do something here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "POLICYPDAS3", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:List*", | |
"s3:Get*", | |
"s3:Put*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( class_exists( 'PDA_Private_Link_Services' ) ) { | |
//669 is attachment's id. | |
$result = PDA_Private_Link_Services::protect_file( 669 ); | |
if ( is_wp_error( $result ) ) { | |
echo $result->get_error_message(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function handle_pda_before_sending_file_hook( $server_data, $link_data ) { | |
//Write code to handle data here | |
} | |
add_action( 'PDA_HOOK_BEFORE_SENDING_FILE', 'handle_pda_before_sending_file_hook', 10, 2 ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( class_exists( 'PDA_Private_Link_Services' ) ) { | |
//669 is attachment's id. | |
return PDA_Private_Link_Services::create_private_link( 669, array( | |
'expired_days' => 5, | |
'limit_downloads' => 3, | |
) ); | |
} |
NewerOlder