本文整理汇总了PHP中backupbuddy_core::generate_api_key方法的典型用法代码示例。如果您正苦于以下问题:PHP backupbuddy_core::generate_api_key方法的具体用法?PHP backupbuddy_core::generate_api_key怎么用?PHP backupbuddy_core::generate_api_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::generate_api_key方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
pb_backupbuddy::$ui->title(__('Deploy Database', 'it-l10n-backupbuddy') . ' <a style="font-size: 0.6em;" href="#" onClick="jQuery(\'#pb_backupbuddy_status_wrap\').toggle();">Display Status Log</a>');
if (!defined('BACKUPBUDDY_API_ENABLE') || TRUE != BACKUPBUDDY_API_ENABLE) {
pb_backupbuddy::alert("Make sure the following is in your wp-config.php file on this server:<br><textarea style='width: 100%;' disabled='disabled'>define( 'BACKUPBUDDY_API_ENABLE', true ); // Requires API key to access.</textarea>");
return false;
}
/*
if ( ! defined( 'BACKUPBUDDY_API_SALT' ) || ( 'CHANGEME' == BACKUPBUDDY_API_SALT ) || ( strlen( BACKUPBUDDY_API_SALT ) < 5 ) ) {
pb_backupbuddy::alert( "Make sure the following is in your wp-config.php file on this server:<br><textarea style='width: 100%;' disabled='disabled'>define( 'BACKUPBUDDY_API_SALT', 'CHANGEME' ); // !!! IMPORTANT !!! Change CHANGEME to the left to a unique password/phrase for generating API keys. 5+ characters.</textarea>" );
return false;
}
*/
if ('1' == pb_backupbuddy::_POST('regenerate_api_key')) {
pb_backupbuddy::verify_nonce();
// Security check.
pb_backupbuddy::$options['api_key'] = backupbuddy_core::generate_api_key();
pb_backupbuddy::save();
}
?>
<b>Note:</b> wp-config.php files as well as BackupBuddy settings will NOT be transferred in either direction. Your current BackupBuddy settings, destinations, API keys etc. will remain as they are on both sites.<br><br>
<form method="post">
<?php
pb_backupbuddy::nonce();
?>
<input type="hidden" name="regenerate_api_key" value="1">
<button class="button secondary-button" onClick="jQuery('.backupbuddy_api_key-hide').toggle(); return false;">Show API Key</button><span class="backupbuddy_api_key-hide" style="display: none;"> <input type="submit" name="submit" value="Generate New API Key" class="button button-primary"></span>
<br>
<br>
<div class="backupbuddy_api_key-hide" style="display: none;">