Example #1
0
 static function generate_hashes($vars)
 {
     $api_key = wprp_get_api_keys();
     if (!$api_key) {
         return array();
     }
     $hashes = array();
     foreach ($api_key as $key) {
         $hashes[] = hash_hmac('sha256', serialize($vars), $key);
     }
     return $hashes;
 }
Example #2
0
/**
 * Success message for a newly added API Key
 *
 * @return null
 */
function wprp_api_key_added_admin_notice()
{
    if (function_exists('get_current_screen') && get_current_screen()->base != 'plugins' || empty($_GET['settings-updated']) || !wprp_get_api_keys()) {
        return;
    }
    ?>

	<div id="wprp-message" class="updated">
		<p><strong><?php 
    _e('WP Remote API Key successfully added');
    ?>
</strong>, close this window to go back to <a href="<?php 
    echo esc_url(wprp_get_wpr_url('/app/'));
    ?>
"><?php 
    _e('WP Remote', 'wpremote');
    ?>
</a>.</p>
	</div>

<?php 
}