本文整理汇总了PHP中pb_backupbuddy::disalert方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::disalert方法的具体用法?PHP pb_backupbuddy::disalert怎么用?PHP pb_backupbuddy::disalert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::disalert方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
<?php
pb_backupbuddy::$classes['core']->versions_confirm();
pb_backupbuddy::load_script('jquery');
echo '<div style="margin-top: 40px;">';
pb_backupbuddy::disalert('getting_started_hover_tip', '<span class="pb_label">Tip</span> ' . sprintf(__('Throughout the plugin you may hover your mouse over question marks %1$s for tips or click play icons %2$s for video tutorials.', 'it-l10n-backupbuddy'), pb_backupbuddy::tip(__('This tip provides additional help.', 'it-l10n-backupbuddy'), '', false), pb_backupbuddy::video('WQrOCvOYof4', __('Introduction to BackupBuddy', 'it-l10n-backupbuddy'), false)));
//pb_backupbuddy::disalert( 'getting_started_tabs_tip', '<span class="pb_label">Tip</span> Select the from the tabs above for details & tutorials covering BackupBuddy\'s primary features.' );
pb_backupbuddy::$ui->start_tabs('getting_started', array(array('title' => __('Overview', 'it-l10n-backupbuddy'), 'slug' => 'overview'), array('title' => __('Backup', 'it-l10n-backupbuddy'), 'slug' => 'backup'), array('title' => __('Migrate / Restore', 'it-l10n-backupbuddy'), 'slug' => 'restore_migrate')), 'width: 100%;');
pb_backupbuddy::$ui->start_tab('overview');
//echo '<p><i>"' . pb_backupbuddy::settings( 'description' ) . '"</i></p>';
/*
echo '<p>';
echo '<span class="pb_label">Tip</span> <b>Select the from the tabs above for details & tutorials covering BackupBuddy\'s primary features.</b>';
echo '</p>';
*/
//echo '<p>';
echo '<h2>Quick Start</h2>';
//echo '</p>';
?>
<ol>
<li type="disc">Receive error notifications by verifying your "Error Notification Email" on the <a href="?page=pb_backupbuddy_settings">Settings</a> page.</li>
<li type="disc">Keep backups from piling up with "Local Archive Storage Limits" on the <a href="?page=pb_backupbuddy_settings">Settings</a> page.</li>
<li type="disc">Keep your site backed up regularly by creating schedules on the <a href="?page=pb_backupbuddy_scheduling">Scheduling</a> page.</li>
<li type="disc">Read the tabbed sections above or tutorials & videos linked in the "Tutorials & Support" box to the right for more in-depth information.</li>
</ol>
<h2>Main Features</h2><br>
Select from the tabs above for information & <b>tutorials</b> about BackupBuddy's main features. The "Tutorials & Support" box to the upper right contains valuable resources for learning how to use BackupBuddy to its fullest potential as well as tips and troubleshooting information.
<br><br>
<h2>Additional Features</h2>
示例2: htmlentities
&remote_path=<?php
echo htmlentities(pb_backupbuddy::_GET('remote_path'));
?>
&downloadlink_file=' + backup_file + '&stashhash=' + jQuery('#pb_backupbuddy_stashhash').attr( 'rel' );
window.location.href = backup_url;
return false;
} );
});
</script>
<?php
pb_backupbuddy::disalert('stash_offsite_welcome_link', 'Did you know you can download all of your BackupBuddy Stash backups offsite? <a href="http://ithemes.com/member/stash.php" target="_new"pluginb>Go check it out!</a>');
// Load required files.
require_once pb_backupbuddy::plugin_path() . '/destinations/stash/init.php';
require_once dirname(__FILE__) . '/lib/class.itx_helper.php';
require_once dirname(dirname(__FILE__)) . '/_s3lib/aws-sdk/sdk.class.php';
// Settings.
if (isset(pb_backupbuddy::$options['remote_destinations'][pb_backupbuddy::_GET('destination_id')])) {
$settings =& pb_backupbuddy::$options['remote_destinations'][pb_backupbuddy::_GET('destination_id')];
}
$settings = array_merge(pb_backupbuddy_destination_stash::$default_settings, $settings);
$itxapi_username = $settings['itxapi_username'];
$itxapi_password = $settings['itxapi_password'];
// Set up paths.
if (pb_backupbuddy::_GET('remote_path') == '') {
$remote_path = pb_backupbuddy_destination_stash::get_remote_path();
// Has leading and trailng slashes. $settings['directory']
示例3: die
if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
die('Access Denied. Error 445543454754.');
}
pb_backupbuddy::load_script('jquery.leanModal.min.js');
pb_backupbuddy::load_style('admin.css');
pb_backupbuddy::load_script('filetree.js');
pb_backupbuddy::load_style('filetree.css');
if (pb_backupbuddy::_GET('value') == '') {
$file = pb_backupbuddy::_GET('zip_viewer');
} else {
$file = pb_backupbuddy::_GET('value');
}
$file = str_replace('\\', '', $file);
$file = str_replace('/', '', $file);
$serial = backupbuddy_core::get_serial_from_file($file);
pb_backupbuddy::disalert('restore_caution', __('Caution: Restored files may overwrite existing files of the same name. Use caution when restoring, especially when restoring large numbers of files to avoid breaking the site.', 'it-l10n-backupbuddy'));
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#pb_backupbuddy_file_browser').fileTree(
{
root: '',
multiFolder: false,
script: '<?php
echo pb_backupbuddy::ajax_url('file_tree');
?>
&serial=<?php
示例4: trim
if (isset($_POST[$field]) && $_POST[$field] == '1') {
$_POST['pb_backupbuddy_profiles#' . $profile . '#mysqldump_additional_includes'] = '-1';
$_POST['pb_backupbuddy_profiles#' . $profile . '#mysqldump_additional_excludes'] = '-1';
}
// If global excludes then set excludes to -1.
$field = 'pb_backupbuddy_profiles#' . $profile . '#profile_globalexcludes';
if (isset($_POST[$field]) && $_POST[$field] == '1') {
$_POST['pb_backupbuddy_profiles#' . $profile . '#excludes'] = '-1';
}
$process_result = $settings_form->process();
// Handles processing the submitted form (if applicable).
if (count((array) $process_result['errors']) == 0 && count((array) $process_result['data']) > 0) {
$excludes = pb_backupbuddy::_POST('pb_backupbuddy_profiles#' . $profile . '#mysqldump_additional_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);
}
if (count($fileExcludes) == 0) {
?>
<script type="text/javascript">
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();
});
示例5: die
<?php
if (!is_admin()) {
die('Access Denied.');
}
// Display additional information for users on Windows systems.
if (stristr(PHP_OS, 'WIN') && !stristr(PHP_OS, 'DARWIN')) {
// Show in WINdows but not darWIN.
pb_backupbuddy::disalert('windows_boost', __('Windows servers may be able to significantly boost performance, if the server allows executing .exe files (or can be configured to allow this file as an exception), by adding native Zip compatibility executable files <a href="http://ithemes.com/backupbuddy_files/backupbuddy_windows_unzip.zip">available for download here</a>. Instructions are provided within the readme.txt in the package. This package prevents Windows from falling back to Zip compatiblity mode and works for both BackupBuddy and importbuddy.php. This is particularly useful for <a href="http://ithemes.com/codex/page/BackupBuddy:_Local_Development">local development on a Windows machine using a system like XAMPP</a>.', 'it-l10n-backupbuddy'));
}
?>
<style type="text/css">
.pb_backupbuddy_customize_email_error_row, .pb_backupbuddy_customize_email_scheduled_start_row, .pb_backupbuddy_customize_email_scheduled_complete_row, .pb_backupbuddy_customize_email_send_finish_row {
display: none;
}
.form-table th {
white-space: nowrap;
}
.form-table td {
word-break: break-all;
}
</style>
<script type="text/javascript">
function checkEmailNotifyErrorStatus() {
if ( '' === jQuery('#pb_backupbuddy_email_notify_error').val() ) {
jQuery('#pb_backupbuddy_email_notify_error').css( 'background-color', '#FFA1A1' );
示例6: jQuery
</ol>
<script>
jQuery(window).load(function() {
jQuery(document).on( 'click', '.pb_backupbuddy_begintour', function(e) {
jQuery("#pb_backupbuddy_tour").joyride({
tipLocation: 'top',
});
return false;
});
});
</script>
<?php
pb_backupbuddy::$ui->title(__('Settings', 'it-l10n-backupbuddy'));
backupbuddy_core::versions_confirm();
pb_backupbuddy::disalert('profile_suggest', '<span class="pb_label" style="font-size: 12px; margin-left: 10px; position: relative;">Tip</span> You can create & customize multiple different backup types with profiles on the <a href="?page=pb_backupbuddy_backup">Backups</a> page by selecting the gear icon next to each profile.');
$data = array();
// To pass to view.
// Reset settings to defaults.
if (pb_backupbuddy::_POST('reset_defaults') != '') {
pb_backupbuddy::verify_nonce();
if (call_user_func('pb_backupbuddy::reset_options', true) === true) {
backupbuddy_core::verify_directories($skipTempGeneration = true);
// Re-verify directories such as backup dir, temp, etc.
//pb_backupbuddy::alert( 'Plugin settings have been reset to defaults.' );
backupbuddy_core::addNotification('settings_reset', 'Plugin settigns reset', 'All plugin settings have been reset to defaults.');
} else {
pb_backupbuddy::alert('Unable to reset plugin settings. Verify you are running the latest version.');
}
}
/* BEGIN VERIFYING BACKUP DIRECTORY */
示例7: __
});
jQuery('.pluginbuddy_pop').click(function(e) {
showpopup('#'+jQuery(this).attr('href'),'',e);
return false;
});
});
</script>
<?php
pb_backupbuddy::$ui->title(__('BackupBuddy Schedules', 'it-l10n-backupbuddy'));
pb_backupbuddy::disalert('schedule_limit_reminder', '<span class="pb_label">Tip</span> ' . __('Keep old backups from piling up by configuring "Local Archive Storage Limits" on the Settings page.', 'it-l10n-backupbuddy'));
if (count($schedules) > 0 && pb_backupbuddy::_GET('edit') == '') {
pb_backupbuddy::$ui->list_table($schedules, array('action' => pb_backupbuddy::page_url(), 'columns' => array(__('Title', 'it-l10n-backupbuddy'), __('Profile', 'it-l10n-backupbuddy'), __('Interval', 'it-l10n-backupbuddy'), __('Destinations', 'it-l10n-backupbuddy'), __('Run Time', 'it-l10n-backupbuddy') . pb_backupbuddy::tip(__('First run indicates the first time thie schedule ran or will run. Last run time is the last time that this scheduled backup started. This does not imply that the backup completed, only that it began at this time. The last run time is reset if the schedule is edited. Next run indicates when it is next scheduled to run. If there is no server activity during this time the schedule will be delayed.', 'it-l10n-backupbuddy'), '', false), __('Status', 'it-l10n-backupbuddy')), 'hover_actions' => array('edit' => 'Edit Schedule', 'run' => 'Run Now'), 'bulk_actions' => array('delete_schedule' => 'Delete'), 'css' => 'width: 100%;'));
echo '<br>';
}
if (pb_backupbuddy::_GET('edit') == '') {
echo '<h3>' . __('Add New Schedule', 'it-l10n-backupbuddy') . '</h3>';
} else {
echo '<h3>' . __('Edit Schedule', 'it-l10n-backupbuddy') . '</h3>';
}
$schedule_form->display_settings('+ ' . $mode_title);
if (pb_backupbuddy::_GET('edit') != '') {
echo '<br><br><a href="' . pb_backupbuddy::page_url() . '&tab=1#database_replace" class="button secondary-button">← ' . __('back', 'it-l10n-backupbuddy') . '</a>';
}
echo '<br><br>';
?>
示例8: jQuery
<li data-class="profile_choose">Click a backup type to start a backup now...</li>
<li data-id="pb_backupbuddy_afterbackupremote">Select to send a backup to a remote destination after the manual backup completes. After selecting this option select a profile above to start a backup.</li>
<li data-class="nav-tab-0">Backups stored on this server are listed here... Hover over backups listed for additional options such as sending to another server or restoring files.</li>
<li data-class="nav-tab-1" data-button="Finish">This provides a historical listing of recently created backups and the status of each.</li>
</ol>
<script>
jQuery(window).load(function() {
jQuery(document).on( 'click', '.pb_backupbuddy_begintour', function(e) {
jQuery("#pb_backupbuddy_tour").joyride({
tipLocation: 'top',
});
return false;
});
});
</script>
<?php
// END TOUR.
backupbuddy_core::versions_confirm();
$alert_message = array();
$preflight_checks = backupbuddy_core::preflight_check();
foreach ($preflight_checks as $preflight_check) {
if ($preflight_check['success'] !== true) {
//$alert_message[] = $preflight_check['message'];
pb_backupbuddy::disalert($preflight_check['test'], $preflight_check['message']);
}
}
if (count($alert_message) > 0) {
//pb_backupbuddy::alert( implode( '<hr style="border: 1px dashed #E6DB55; border-bottom: 0;">', $alert_message ) );
}
$view_data['backups'] = backupbuddy_core::backups_list('default');
pb_backupbuddy::load_view('_backup-home', $view_data);
示例9:
<?php
if (!defined('pluginbuddy_importbuddy')) {
pb_backupbuddy::$ui->title(__('Malware Scan', 'it-l10n-backupbuddy'));
pb_backupbuddy::disalert('it-security_ad', '<b>Is your site locked down & secure?</b><br> Check out <a href="http://ithemes.com/security/?utm_source=BackupBuddy%20Malware%20Scan%20Page&utm_medium=bub%20link&utm_campaign=itsec%20%2B%20bub" target="_blank">iThemes Security Pro</a>, for the do-it-yourself WP security toolbox, or have the website security professionals at <a href="http://affl.sucuri.net/?affl=9f3b0b860f5354d896add4fd435a95ed&utm_source=BackupBuddy%20Malware%20Scan%20Page&utm_medium=bub%20link&utm_campaign=sucuri%20%2B%20bub">Sucuri</a> do it for you.');
}
?>
<style type="text/css">
.inside label {
display: block;
vertical-align: top;
width: 140px;
font-weight: bold;
}
</style>
<?php
pb_backupbuddy::$ui->start_metabox(__('Malware Scan URL', 'it-l10n-backupbuddy'), true, 'width: 100%;');
?>
<?php
echo $url;
?>
<?php
$continue_1 = true;
if ($url == 'http://localhost') {
_e('ERROR: You are currently running your site locally. Your site must be internet accessible to scan.', 'it-l10n-backupbuddy');
$continue_1 = false;
}
示例10: wp_enqueue_script
<?php
wp_enqueue_script('thickbox');
wp_print_scripts('thickbox');
wp_print_styles('thickbox');
pb_backupbuddy::disalert('backup_stash_advert', 'Active BackupBuddy customers already have a <b>BackupBuddy Stash</b> account with <span class="pb_label pb_label">1 GB Free Storage</span>. Just login on the <a href="?page=pb_backupbuddy_destinations">Remote Destinations</a> page.');
?>
<style type="text/css">
#backupbuddy-meta-link-wrap a.show-settings {
float: right;
margin: 0 0 0 6px;
}
#screen-meta-links #backupbuddy-meta-link-wrap a {
background: none;
}
#screen-meta-links #backupbuddy-meta-link-wrap a:after {
content: '';
margin-right: 5px;
}
</style>
<script type="text/javascript">
jQuery(document).ready( function() {
jQuery('#screen-meta-links').append(
'<div id="backupbuddy-meta-link-wrap" class="hide-if-no-js screen-meta-toggle">' +
'<a href="" class="show-settings pb_backupbuddy_begintour"><?php
_e("Tour Page", "it-l10n-backupbuddy");
?>
</a>' +
'</div>'
示例11: site_url
$access_token = ITXAPI_Helper2::get_access_token($destination_settings['itxapi_username'], $password_hash, site_url(), $wp_version);
$settings = array('itxapi_username' => $destination_settings['itxapi_username'], 'itxapi_password' => $access_token, 'itxapi_token' => $destination_settings['itxapi_token']);
$response = pb_backupbuddy_destination_live::stashAPI($settings, 'disconnect');
if (!is_array($response)) {
pb_backupbuddy::alert('Error Disconnecting: ' . $response);
} elseif (!isset($response['success']) || '1' != $response['success']) {
pb_backupbuddy::alert('Error #483948944. Unexpected response disconnecting: `' . print_r($response, true) . '`.');
} else {
$disconnected = true;
// Clear destination settings.
unset(pb_backupbuddy::$options['remote_destinations'][$liveDestinationID]);
pb_backupbuddy::save();
// Clear cached Live credentials.
require_once pb_backupbuddy::plugin_path() . '/destinations/live/init.php';
delete_transient(pb_backupbuddy_destination_live::LIVE_ACTION_TRANSIENT_NAME);
pb_backupbuddy::disalert('', 'You have disconnected from Stash Live.');
$liveDestinationID = false;
}
}
// Show authentication form.
if (false === $disconnected) {
if (is_multisite()) {
$admin_url = network_admin_url('admin.php');
} else {
$admin_url = admin_url('admin.php');
}
?>
<h3><?php
_e('Disconnect from Stash Live', 'it-l10n-backupbuddy');
?>
</h3>
示例12: unset
// Handle deleting profile.
if (pb_backupbuddy::_GET('delete_profile') != '' && is_numeric(pb_backupbuddy::_GET('delete_profile'))) {
if (pb_backupbuddy::_GET('delete_profile') > 2) {
if (isset(pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('delete_profile')])) {
$profile_title = pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('delete_profile')]['title'];
unset(pb_backupbuddy::$options['profiles'][pb_backupbuddy::_GET('delete_profile')]);
pb_backupbuddy::save();
pb_backupbuddy::alert('Deleted profile "' . htmlentities($profile_title) . '".');
}
} else {
pb_backupbuddy::alert('Invalid profile ID. Cannot delete base profiles.');
}
}
// Quickwizard just completed.
if (isset($_GET['quickstart_wizard']) && '' != $_GET['quickstart_wizard']) {
pb_backupbuddy::disalert('quickstart_wizard_finished', __('Quick Setup Wizard complete. Select a backup profile below to start backing up. See the <a href="admin.php?page=pb_backupbuddy_settings" target="_top">Settings</a> page for all configuration options.', 'it-l10n-backupbuddy'));
}
// Add new profile.
if (pb_backupbuddy::_POST('add_profile') == 'true') {
pb_backupbuddy::verify_nonce();
$error = false;
if (pb_backupbuddy::_POST('title') == '') {
pb_backupbuddy::alert('Error: You must provide a new profile title.', true);
$error = true;
}
if (false === $error) {
$profile = array('title' => htmlentities(pb_backupbuddy::_POST('title')), 'type' => pb_backupbuddy::_POST('type'));
$profile = array_merge(pb_backupbuddy::settings('profile_defaults'), $profile);
pb_backupbuddy::$options['profiles'][] = $profile;
pb_backupbuddy::save();
pb_backupbuddy::alert('New profile "' . htmlentities(pb_backupbuddy::_POST('title')) . '" added. Select it from the list below to customize its settings and override global defaults.');
示例13: print_r
echo '<pre>';
print_r( $backup_options->options );
echo '</pre>';
*/
/*
require_once( pb_backupbuddy::plugin_path() . '/classes/live.php' );
$live = new pb_backupbuddy_live();
$start_time = microtime(true);
$live->generate_queue( ABSPATH );
echo 'Took ' . ( microtime(true)-$start_time ) . ' sec.';
die();
*/
if (!defined('pluginbuddy_importbuddy')) {
pb_backupbuddy::$ui->title(__('Malware Scan', 'it-l10n-backupbuddy'));
pb_backupbuddy::disalert('it-security_ad', '<b>Take Your Site Security to the Next Level</b><br>You’ve got a great start having full-site backups, stored off-site with BackupBuddy. Now take your site security to the next level with <a href="http://ithemes.com/security/" target="_new">iThemes Security Pro</a>.');
}
?>
<style type="text/css">
.inside label {
display: block;
vertical-align: top;
width: 140px;
font-weight: bold;
}
</style>
<?php
pb_backupbuddy::$ui->start_metabox(__('Malware Scan URL', 'it-l10n-backupbuddy'), true, 'width: 100%;');
if (!defined('pluginbuddy_importbuddy')) {
示例14: alert_core_file_excludes
public function alert_core_file_excludes($excludes)
{
global $wpdb;
$prefix = $wpdb->prefix;
// If these tables are found excluded then warn that may be a bad idea.
$warn_tables = array($prefix . 'comments', $prefix . 'posts', $prefix . 'users', $prefix . 'commentmeta', $prefix . 'postmeta', $prefix . 'term_relationships', $prefix . 'options', $prefix . 'term_taxonomy', $prefix . 'links', $prefix . 'terms');
$excludes_arr = explode("\n", trim($excludes));
foreach ($warn_tables as $warn_table) {
if (in_array($warn_table, $excludes_arr)) {
pb_backupbuddy::disalert('excluding_coretable-' . md5($excludes), '<span class="pb_label pb_label-important">Warning</span> You are excluding one or more core WordPress tables which may result in an incomplete backup. Remove exclusions or backup with another profile or method.');
}
}
}