Created
December 9, 2022 09:30
-
-
Save codename065/b0c1aba46ee6a4f5fe6ff8748f432e4b to your computer and use it in GitHub Desktop.
WordPress Download Manager - Bulk generate master key
This file contains hidden or 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 | |
//www.wpdownloadmanager.com | |
$all_packages = get_posts(['post_type' => 'wpdmpro', 'posts_per_page' => -1]); | |
foreach($all_packages as $package){ | |
$masterKey = \WPDM\__\Crypt::encrypt( [ 'id' => $package->ID, 'time' => time() ] ); | |
update_post_meta($package->ID, '__wpdm_masterkey', $masterKey); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment