本文整理汇总了PHP中pb_backupbuddy::nonce方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::nonce方法的具体用法?PHP pb_backupbuddy::nonce怎么用?PHP pb_backupbuddy::nonce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::nonce方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pb_backupbuddy_stash_pass_form
function pb_backupbuddy_stash_pass_form()
{
echo 'Please enter your iThemes.com Member Password to access your full Stash listing including files stored from other sites:<br><br><br>';
echo '<form method="post"><b>iThemes Member Password</b>: <input type="password" name="stash_password" size="20"> <input type="submit" name="submit" value="Authenticate" class="button button-primary">';
pb_backupbuddy::nonce();
echo '</form>';
echo '<br><br><br><br>';
}
示例2:
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;">
<b>Api Key:</b><br>
<textarea style="width: 100%; padding: 15px;" readonly="readonly" onClick="this.focus();this.select();"><?php
echo pb_backupbuddy::$options['api_key'];
?>
</textarea>
</div>
</form>
<br><br>
示例3: list_table
public static function list_table($items, $settings)
{
$default_settings = array('columns' => array(), 'hover_actions' => array(), 'bulk_actions' => array(), 'hover_action_column_key' => '', 'action' => '', 'reorder' => '', 'after_bulk' => '', 'css' => '');
// Merge defaults.
$settings = array_merge($default_settings, $settings);
// Function to iterate through bulk actions. Top and bottom set are the same.
if (!function_exists('bulk_actions')) {
function bulk_actions($settings, $hover_note = false)
{
if (count($settings['bulk_actions']) > 0) {
echo '<div style="padding-bottom: 3px; padding-top: 3px;">';
if (count($settings['bulk_actions']) == 1) {
foreach ($settings['bulk_actions'] as $action_slug => $action_title) {
echo '<input type="hidden" name="bulk_action" value="' . $action_slug . '">';
echo '<input type="submit" name="do_bulk_action" value="' . $action_title . '" class="button secondary-button">';
}
} else {
echo '<select name="bulk_action" class="actions">';
foreach ($settings['bulk_actions'] as $action_slug => $action_title) {
echo '<option>Bulk Actions</option>';
echo '<option value="' . $action_slug . '">' . $action_title . '</option>';
}
echo '</select> ';
//echo self::button( '#', 'Apply' );
echo '<input type="submit" name="do_bulk_action" value="Apply" class="button secondary-button">';
}
echo ' ';
echo $settings['after_bulk'];
echo '<div class="alignright actions">';
if ($hover_note === true) {
echo pb_backupbuddy::$ui->note('Hover over items above for additional options.');
}
if ($settings['reorder'] != '') {
echo ' <input type="submit" name="save_order" id="save_order" value="Save Order" class="button-secondary" />';
}
echo '</div>';
echo '</div>';
}
}
// End subfunction bulk_actions().
}
// End if function does not exist.
if ($settings['action'] != '') {
echo '<form method="post" action="' . $settings['action'] . '">';
pb_backupbuddy::nonce();
if ($settings['reorder'] != '') {
echo '<input type="hidden" name="order" value="" id="pb_order">';
}
}
echo '<div style="width: 70%; min-width: 720px; ' . $settings['css'] . '">';
// Display bulk actions (top).
bulk_actions($settings);
echo '<table class="widefat"';
echo ' id="test">';
echo ' <thead>
<tr class="thead">';
if (count($settings['bulk_actions']) > 0) {
echo ' <th scope="col" class="check-column"><input type="checkbox" class="check-all-entries" /></th>';
}
foreach ($settings['columns'] as $column) {
echo '<th>' . $column . '</th>';
}
echo ' </tr>
</thead>
<tfoot>
<tr class="thead">';
if (count($settings['bulk_actions']) > 0) {
echo ' <th scope="col" class="check-column"><input type="checkbox" class="check-all-entries" /></th>';
}
foreach ($settings['columns'] as $column) {
echo '<th>' . $column . '</th>';
}
echo ' </tr>
</tfoot>
<tbody';
if ($settings['reorder'] != '') {
echo ' class="pb_reorder"';
}
echo '>';
// LOOP THROUGH EACH ROW.
foreach ((array) $items as $item_id => $item) {
echo ' <tr class="entry-row alternate" id="pb_rowitem-' . $item_id . '">';
if (count($settings['bulk_actions']) > 0) {
echo ' <th scope="row" class="check-column"><input type="checkbox" name="items[]" class="entries" value="' . $item_id . '"></th>';
}
echo ' <td>';
if (is_array($item['0'])) {
if ($item['0'][1] == '') {
echo ' ';
} else {
echo $item['0'][1];
}
} else {
if ($item['0'] == '') {
echo ' ';
} else {
echo $item['0'];
}
}
echo ' <div class="row-actions">';
//.........这里部分代码省略.........
示例4: end
public function end($echo = false)
{
$this->_ended = true;
// TODO: fields maybe?
//$return = pb_backupbuddy::nonce( $this->_form_name );
$return = pb_backupbuddy::nonce(false);
// Do not echo.
$return .= '</form>';
if ($echo === true) {
echo $return;
} else {
return $return;
}
}
示例5:
data = jQuery.trim( data );
alert( data );
}
);
}
</script>
<p>
Complete this optional wizard to start using BackupBuddy right away. See the <a href="admin.php?page=pb_backupbuddy_settings" target="_top">Settings</a> page for all configuration options.
</p>
<form id="pb_backupbuddy_quickstart_form" method="post">
<?php
pb_backupbuddy::nonce(true);
?>
<input type="hidden" name="quicksetup" value="true">
<div class="setup">
<div class="step email">
<h4><span class="number">1.</span> Enter your e-mail address to get backup and error notifications.</h4>
<!-- <p>You'll get emails when backups are completed or if there is an error with a backup.</p> -->
<div class="backupbuddy-quickstart-indent">
<label>E-mail Address</label>
<input type="email" id="pb_backupbuddy_quickstart_email" name="email" value="<?php
echo pb_backupbuddy::$options['email_notify_error'];
?>
">
<img src="<?php
echo pb_backupbuddy::plugin_url();
?>
示例6: __
</td>
<td style="white-space: nowrap;">
<?php
echo pb_backupbuddy::$format->date( pb_backupbuddy::$format->localize_time( $results[$rekey]['time'] ) );
echo '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago( $results[$rekey]['time'] ) . ' ago)</span>';
?>
</td>
<td style="white-space: nowrap;">
<?php echo pb_backupbuddy::$format->file_size( $results[$rekey]['size'] ); ?>
</td>
<td>
<?php echo '<a href="' . pb_backupbuddy::page_url() . '&custom=' . $_GET['custom'] . '&destination_id=' . $_GET['destination_id'] . '&copy_file=' . $bubup . '">', __('Copy to local', 'it-l10n-backupbuddy' ), '</a>'; ?>
</td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>
<div class="tablenav">
<div class="alignleft actions">
<input type="submit" name="delete_file" value="Delete from S3" class="button-secondary delete" />
</div>
</div>
<?php pb_backupbuddy::nonce(); ?>
</form><br />
</div>