本文整理汇总了PHP中pb_backupbuddy_settings::display_settings方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy_settings::display_settings方法的具体用法?PHP pb_backupbuddy_settings::display_settings怎么用?PHP pb_backupbuddy_settings::display_settings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy_settings
的用法示例。
在下文中一共展示了pb_backupbuddy_settings::display_settings方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlentities
global $pb_hide_test, $pb_hide_save;
$pb_hide_test = false;
$itxapi_username = '';
$itxapi_password = '';
if ($mode == 'add') {
// ADD MODE.
$credentials_form = new pb_backupbuddy_settings('pre_settings', false, 'action=pb_backupbuddy_backupbuddy&function=destination_picker&quickstart=' . htmlentities(pb_backupbuddy::_GET('quickstart')) . '&add=' . htmlentities(pb_backupbuddy::_GET('add')) . '&callback_data=' . htmlentities(pb_backupbuddy::_GET('callback_data')) . '&sending=' . pb_backupbuddy::_GET('sending'));
// name, savepoint|false, additional querystring
$credentials_form->add_setting(array('type' => 'text', 'name' => 'itxapi_username', 'title' => __('iThemes username', 'it-l10n-backupbuddy'), 'tip' => __('[Example: kerfuffle] - Your iThemes.com / PluginBuddy membership username.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-45]'));
$credentials_form->add_setting(array('type' => 'password', 'name' => 'itxapi_password_raw', 'title' => __('iThemes password', 'it-l10n-backupbuddy'), 'tip' => __('[Example: 48dsds!s08K%x2s] - Your iThemes.com / PluginBuddy membership password.', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-250]'));
$settings_result = $credentials_form->process();
$login_welcome = __('Log in with your iThemes.com member account to begin.', 'it-l10n-backupbuddy');
if (count($settings_result) == 0) {
// No form submitted.
echo $login_welcome;
$credentials_form->display_settings('Submit');
$pb_hide_test = true;
$pb_hide_save = true;
return;
} else {
// Form submitted.
if (count($settings_result['errors']) > 0) {
// Form errors.
echo $login_welcome;
pb_backupbuddy::alert(implode('<br>', $settings_result['errors']));
$credentials_form->display_settings('Submit');
$pb_hide_test = true;
$pb_hide_save = true;
return;
} else {
// No form errors; process!
示例2: htmlentities
jQuery(document).ready(function() {
var win = window.dialogArguments || opener || parent || top;
win.pb_backupbuddy_profile_updated( '<?php
echo $profile;
?>
', '<?php
echo htmlentities(pb_backupbuddy::$options['profiles'][$profile]['title']);
?>
' );
win.tb_remove();
});
</script>
<?php
}
}
$settings_form->display_settings('Save Profile Settings');
if ($profile > 2) {
?>
<a style="float: right; margin-top: -35px; margin-right: 10px;" class="button secondary-button" title="Delete this Profile" href="admin.php?page=pb_backupbuddy_backup&delete_profile=<?php
echo $profile;
?>
" target="_top" onclick="
if ( !confirm( 'Are you sure you want to delete this profile?' ) ) {
return false;
}
">Delete Profile</a>
<?php
}
?>
示例3: trim
// Handles processing the submitted form (if applicable).
if (count((array) $process_result['errors']) == 0) {
$table_excludes = pb_backupbuddy::_POST('pb_backupbuddy_profiles#0#mysqldump_additional_excludes');
$tableExcludes = backupbuddy_core::alert_core_table_excludes(explode("\n", trim($table_excludes)));
foreach ($tableExcludes as $tableExcludeId => $tableExclude) {
pb_backupbuddy::disalert($tableExcludeId, '<span class="pb_label pb_label-important">Warning</span> ' . $tableExclude);
}
$excludes = pb_backupbuddy::_POST('pb_backupbuddy_profiles#0#excludes');
$fileExcludes = backupbuddy_core::alert_core_file_excludes(explode("\n", trim($excludes)));
foreach ($fileExcludes as $fileExcludeId => $fileExclude) {
pb_backupbuddy::disalert($fileExcludeId, '<span class="pb_label pb_label-important">Warning</span> ' . $fileExclude);
}
}
$settings_form->set_value('importbuddy_pass_hash', $importbuddy_pass_dummy_text);
/* END CONFIGURING PLUGIN SETTINGS FORM */
$settings_form->display_settings('Save General Settings');
?>
<div style="float: right; margin-top: -28px;">
<div style="float: right;">
<form method="post" action="<?php
echo pb_backupbuddy::page_url();
?>
">
<input type="hidden" name="reset_defaults" value="<?php
echo pb_backupbuddy::settings('slug');
?>
" />
<input type="submit" name="submit" value="Reset Plugin Settings to Defaults" id="reset_defaults" class="button secondary-button" onclick="if ( !confirm('WARNING: This will reset all settings associated with this plugin to their defaults. Are you sure you want to do this?') ) { return false; }" />
</form>
示例4: die
echo $next_index;
?>
', '<?php
echo $destination['title'];
?>
(local)', '<?php
if (!empty($_GET['callback_data'])) {
echo $_GET['callback_data'];
}
?>
' );
win.tb_remove();
//return false;
});
</script>
<?php
} else {
pb_backupbuddy::alert('Invalid path. Unable to save. ' . $fail);
}
}
$settings_form->display_settings('Select Local Destination');
?>
<br><br><br>
<div class="description">
* If the URL is not provided you may enter it on the next screen. The URL will be attempted to be guessed.
</div>
<?php
} else {
die('{Unknown picker type.}');
}
示例5: array
) );
$credentials_form->add_setting( array(
'type' => 'hidden',
'name' => 'options',
'default' => htmlspecialchars( serialize( pb_backupbuddy::$options ) ),
) );
*/
$credentials_form->add_setting(array('type' => 'text', 'name' => 'itxapi_username', 'title' => __('iThemes username', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-45]'));
$credentials_form->add_setting(array('type' => 'password', 'name' => 'itxapi_password_raw', 'title' => __('iThemes password', 'it-l10n-backupbuddy'), 'rules' => 'required|string[1-45]'));
$settings_result = $credentials_form->process();
$login_welcome = __('Connect to Stash with your iThemes.com member account to select a backup to restore.', 'it-l10n-backupbuddy') . '<br><br>';
if (count($settings_result) == 0) {
// No form submitted.
echo $login_welcome;
$credentials_form->display_settings('Connect to Stash');
} else {
// Form submitted.
if (count($settings_result['errors']) > 0) {
// Form errors.
echo $login_welcome;
pb_backupbuddy::alert(implode('<br>', $settings_result['errors']));
$credentials_form->display_settings('Connect to Stash');
} else {
// No form errors; process!
$itx_helper_file = dirname(dirname(__FILE__)) . '/classes/class.itx_helper.php';
require_once $itx_helper_file;
$itxapi_username = $settings_result['data']['itxapi_username'];
$itxapi_password = ITXAPI_Helper::get_password_hash($itxapi_username, $settings_result['data']['itxapi_password_raw']);
// Generates hash for use as password for API.
$requestcore_file = dirname(dirname(__FILE__)) . '/lib/requestcore/requestcore.class.php';