本文整理汇总了PHP中pb_backupbuddy::page_url方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::page_url方法的具体用法?PHP pb_backupbuddy::page_url怎么用?PHP pb_backupbuddy::page_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::page_url方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _connect
private static function _connect($accessToken)
{
try {
self::$_dbxClient = new dbx\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
} catch (\Exception $e) {
pb_backupbuddy::alert('Dropbox Error: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '← go back & retry'), true);
return false;
}
pb_backupbuddy::status('details', 'Connected to Dropbox.');
return true;
}
示例2: array
<?php
pb_backupbuddy::$ui->title(__('Deploy Database', 'it-l10n-backupbuddy') . ' <a style="font-size: 0.6em;" href="#" onClick="jQuery(\'#pb_backupbuddy_status_wrap\').toggle();">Show / Hide Advanced Status Details</a>');
pb_backupbuddy::$options['deployments'] = array(array('siteurl' => 'http://backupbuddy2', 'api_key' => 'xxx'));
pb_backupbuddy::save();
if (pb_backupbuddy::_GET('deployment') == '') {
foreach (pb_backupbuddy::$options['deployments'] as $deployment_id => $deployment) {
echo '<a href="' . pb_backupbuddy::page_url() . '&deployment=' . $deployment_id . '">' . $deployment['siteurl'] . '</a>';
}
return;
}
$deployment_id = pb_backupbuddy::_GET('deployment');
?>
<script>
function pb_status_undourl( undo_url ) {
if ( '' == undo_url ) {
jQuery( '#pb_backupbuddy_undourl' ).parent('#message').slideUp();
return;
}
jQuery( '#pb_backupbuddy_undourl' ).attr( 'href', undo_url );
jQuery( '#pb_backupbuddy_undourl' ).text( undo_url );
jQuery( '#pb_backupbuddy_undourl' ).parent('#message').slideDown();
}
</script>
<style>
示例3: admin_url
}
}
);
/* Try to ping server to nudge cron along since sometimes it doesnt trigger as expected. */
jQuery.post( '<?php
echo admin_url('admin-ajax.php');
?>
',
function(data) {
}
);
} else {
window.location.href = '<?php
echo pb_backupbuddy::page_url();
?>
&custom=remoteclient&destination_id=' + destination_id;
}
}
</script>
<style>
.backupbuddyFileTitle {
//color: #0084CB;
color: #000;
font-size: 1.2em;
}
</style>
示例4: elseif
echo '</form>';
}
// end authorication code submitted.
} elseif ('edit' == $mode) {
// EDIT mode.
$accessToken = $destination_settings['access_token'];
try {
$dropboxClient = new \Dropbox\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
} catch (\Exception $e) {
pb_backupbuddy::alert('Dropbox Error #143838: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '← go back & retry'), true);
return false;
}
try {
$accountInfo = $dropboxClient->getAccountInfo();
} catch (\Exception $e) {
pb_backupbuddy::alert('Dropbox Error #132852: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '← go back & retry'), true);
return false;
}
$show_config_form = true;
// Enable showing configuration form below.
} elseif ('save' == $mode) {
$show_config_form = true;
} else {
// UNKNOWN mode.
die('Error #3283489434: Unknown destination form mode.');
}
// End checking mode.
// Display configuration form.
if (true === $show_config_form) {
if ('save' != $mode) {
// Account info.
示例5: add_query_arg
<?php
// This is a half-way conversion from RH's implementation into framework and reusing libraries.
// Still a ways to go...
//STEP 1
$form_url = add_query_arg(array('action' => 'step2'), pb_backupbuddy::page_url());
global $current_site;
?>
<?php
_e('Multisite import allows you to import a site from a BackupBuddy backup archive as a new site within this Multisite network with a new URL. Please upload your BackupBuddy backup archive into the root of your site before proceeding or select an existing backup.', 'it-l10n-backupbuddy');
?>
<?php
_e('Only FULL backups may be imported into a Multisite Network.');
?>
<br><br>
<form method="post" action="<?php
echo esc_url($form_url);
?>
">
<?php
wp_nonce_field('bbms-migration', 'pb_bbms_migrate');
?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row">Backup file to import</th>
<td>
<?php
echo 'Backups in site root:<br>';
示例6:
pb_backupbuddy::$ui->title('View Backup Contents');
?>
<a class="button secondary-button pb_backupbuddy_restore">Restore Selected</a>
<div style="width: 100%; height: 100%;">
<div class="jQueryOuterTree" id="pb_backupbuddy_file_browser" style="position: relative; height: 90%; margin-top: 7px; margin-bottom: 7px;">
<ul class="jqueryFileTree"></ul>
</div>
<span style="float: right;" class="description">Select directories to expand or text-based files to view contents.</span>
<a class="button secondary-button pb_backupbuddy_restore">Restore Selected</a>
<br><br><br><br style="clear: both; height: 0; overflow: hidden;">
<?php
echo pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '← back to backups');
?>
<br style="clear: both; height: 0; overflow: hidden;">
<br><br><br><br>
</div>
<br style="clear: both; height: 0; overflow: hidden;">
<style type="text/css">
#leanModal_div {
height: 90%;
}
.modal_content {
position: absolute;
width: 660px;
示例7: plugin_information
function plugin_information( $plugin_slug, $data ) {
$plugin_path = $data['path'];
?>
<?php pb_backupbuddy::$ui->start_metabox( 'Plugin Information', true, 'width: 70%;' ); ?>
<textarea readonly="readonly" rows="7" cols="65" wrap="off" style="width: 100%;"><?php echo "Version History:\n\n" ; readfile( $plugin_path . '/history.txt' ); ?></textarea>
<br /><br />
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#pluginbuddy_<?php echo $plugin_slug; ?>_debugtoggle").click(function() {
jQuery("#pluginbuddy_<?php echo $plugin_slug; ?>_debugtoggle_div").slideToggle();
});
});
</script>
<?php
if ( pb_backupbuddy::_POST( 'reset_defaults' ) == $plugin_slug ) {
if ( call_user_func( 'pb_' . $plugin_slug . '::reset_options', true ) === true ) {
pb_backupbuddy::alert( 'Plugin settings have been reset to defaults for plugin `' . $data['name'] . '`.' );
} else {
pb_backupbuddy::alert( 'Unable to reset plugin settings. Verify you are running the latest version.' );
}
}
?>
<form method="post" action="<?php echo pb_backupbuddy::page_url(); ?>">
<input type="hidden" name="reset_defaults" value="<?php echo $plugin_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><br>
<?php pb_backupbuddy::$ui->end_metabox(); ?>
<?php
}
示例8: array
$wp_settings[] = array('Upload Base Directory', $wp_upload_dir['basedir'], 'wp_upload_dir()');
}
$wp_settings[] = array('Site URL', site_url(), 'site_url()');
$wp_settings[] = array('Home URL', home_url(), 'home_url()');
$wp_settings[] = array('WordPress Root Path', ABSPATH, 'ABSPATH');
// Multisite extras:
$wp_settings_multisite = array();
if (is_multisite()) {
$wp_settings[] = array('Network Site URL', network_site_url(), 'network_site_url()');
$wp_settings[] = array('Network Home URL', network_home_url(), 'network_home_url()');
}
$wp_settings[] = array('BackupBuddy local storage', backupbuddy_core::getBackupDirectory(), 'BackupBuddy Settings');
$wp_settings[] = array('BackupBuddy temporary files', backupbuddy_core::getTempDirectory(), 'ABSPATH + Hardcoded location');
$wp_settings[] = array('BackupBuddy logs', backupbuddy_core::getLogDirectory(), 'Upload Base + BackupBuddy');
// Display WP settings..
pb_backupbuddy::$ui->list_table($wp_settings, array('action' => pb_backupbuddy::page_url(), 'columns' => array(__('URLs & Paths', 'it-l10n-backupbuddy'), __('Value', 'it-l10n-backupbuddy'), __('Obtained via', 'it-l10n-backupbuddy')), 'css' => 'width: 100%;'));
pb_backupbuddy::$ui->end_tab();
// This page can take a bit to run.
// Runs AFTER server information is displayed so we can view the default limits for the server.
pb_backupbuddy::set_greedy_script_limits();
pb_backupbuddy::$ui->start_tab('database');
require_once 'server_info/database.php';
echo '<br><br><a name="database_replace"></a>';
echo '<div class="pb_htitle">' . 'Advanced: ' . __('Database Mass Text Replacement', 'it-l10n-backupbuddy') . '</div><br>';
pb_backupbuddy::load_view('_server_tools-database_replace');
pb_backupbuddy::$ui->end_tab();
pb_backupbuddy::$ui->start_tab('files');
require_once 'server_info/site_size.php';
pb_backupbuddy::$ui->end_tab();
pb_backupbuddy::$ui->start_tab('cron');
require_once 'server_info/cron.php';
示例9: array
pb_backupbuddy::$ui->title('Local Destination `' . $destination['title'] . '`');
echo 'Listing backups in local directory `' . $destination['path'] . '`...<br><br>';
// Handle deletion.
if (pb_backupbuddy::_POST('bulk_action') == 'delete_backup') {
pb_backupbuddy::verify_nonce();
$deleted_files = array();
foreach ((array) pb_backupbuddy::_POST('items') as $item) {
@unlink($destination['path'] . $item);
if (file_exists($destination['path'] . $item)) {
pb_backupbuddy::alert('Error: Unable to delete `' . $item . '`. Verify permissions.');
} else {
$deleted_files[] = $item;
}
}
if (count($deleted_files) > 0) {
pb_backupbuddy::alert('Deleted ' . implode(', ', $deleted_files) . '.');
}
}
// Find backups in directory.
$backups = glob($destination['path'] . '*.zip');
if (!is_array($backups)) {
$backups = array();
}
// Generate array of table rows.
$backup_list = array();
foreach ($backups as $backup) {
$backup_list[basename($backup)] = array(basename($backup), pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time(filemtime($backup))) . '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago(filemtime($backup)) . ' ago)</span>', pb_backupbuddy::$format->file_size(filesize($backup)));
}
// Render table.
pb_backupbuddy::$ui->list_table($backup_list, array('action' => pb_backupbuddy::page_url() . '&custom=remoteclient&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id')), 'columns' => array('Backup File', 'Last Modified', 'File Size'), 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
示例10: array_merge
}
}
// Get profile array.
$profile = array_merge(pb_backupbuddy::settings('profile_defaults'), pb_backupbuddy::$options['profiles'][$profile_id]);
foreach ($profile as $profile_item_name => &$profile_item) {
// replace non-overridden defaults with actual default value.
if ('-1' == $profile_item) {
// Set to use default so go grab default.
if (isset(pb_backupbuddy::$options['profiles'][0][$profile_item_name])) {
$profile_item = pb_backupbuddy::$options['profiles'][0][$profile_item_name];
// Grab value from defaults profile and replace with it.
}
}
}
echo '<div style="margin-bottom: 4px;">Backup profile for calculating exclusions: ';
echo '<select id="pb_backupbuddy_databaseprofile" onChange="window.location.href = \'' . pb_backupbuddy::page_url() . '&tab=1&profile=\' + jQuery(this).val();">';
foreach (pb_backupbuddy::$options['profiles'] as $this_profile_id => $this_profile) {
?>
<option value="<?php
echo $this_profile_id;
?>
" <?php
if ($profile_id == $this_profile_id) {
echo 'selected';
}
?>
><?php
echo htmlentities($this_profile['title']);
?>
(<?php
echo $this_profile['type'];
示例11: __
<?php
pb_backupbuddy::$ui->title(__('Scheduled Backups', 'it-l10n-backupbuddy'));
/*
if ( count( pb_backupbuddy::$options['schedules'] ) == 0 ) {
pb_backupbuddy::disalert( 'no_schedules_reminder', '<span class="pb_label">Tip</span> Create your first schedule below to keep your site backed up automatically.', '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'));
pb_backupbuddy::$ui->start_metabox($mode_title . ' ' . pb_backupbuddy::video('MGiUdYb68ps', __('Scheduling', 'it-l10n-backupbuddy'), false), true, 'width: 100%;');
$schedule_form->display_settings('+ ' . $mode_title);
echo '<br><br>';
pb_backupbuddy::$ui->end_metabox();
if (count($schedules) == 0) {
//echo '<h4>' . __( 'No schedules have been created yet.', 'it-l10n-backupbuddy' ) . '</h4>';
} else {
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>';
?>
<br /><br />
<div class="description">
<b>Note</b>: Due to the way schedules are triggered in WordPress your site must be accessed (frontend or admin area) for scheduled backups to occur.
WordPress scheduled events ("crons") may be viewed or run manually for testing from the <a href="?page=pb_backupbuddy_server_info">Server Information page</a>.
A <a href="https://www.google.com/search?q=free+website+uptime&oq=free+website+uptime" target="_new">free website uptime</a> service can be used to automatically access your site regularly to help trigger scheduled actions ("crons") in cases of low site activity, with the added perk of keeping track of your site uptime.
</div>
<br /><br />
示例12: array
</a>
</div>
<?php
$dir_array = array();
$icicle_array = array();
$time_start = microtime(true);
//echo '<pre>' . $this->build_icicle( ABSPATH, ABSPATH, '' ) . '</pre>';
echo '<br>';
echo '<div class="pb_htitle">' . __('Directory Size Listing', 'it-l10n-backupbuddy') . '</div><br>';
echo '<a name="pb_backupbuddy_dir_size_listing"> </a>';
if (empty($_GET['site_size'])) {
echo __('This option displays a comprehensive listing of directories and the corresponding size of all contents within, including subdirectories. This is useful for finding where space is being used. Note that this is a CPU intensive process and may take a while to load and even time out on some servers.', 'it-l10n-backupbuddy');
echo '<br /><br /><a href="' . pb_backupbuddy::page_url() . '&site_size=true#pb_backupbuddy_dir_size_listing" class="button secondary-button" style="margin-top: 3px;">', __('Display Directory Size Listing', 'it-l10n-backupbuddy'), '</a>';
} else {
$exclusions = pb_backupbuddy_core::get_directory_exclusions();
$result = pb_backupbuddy::$filesystem->dir_size_map(ABSPATH, ABSPATH, $exclusions, $dir_array);
$total_size = pb_backupbuddy::$options['stats']['site_size'] = $result[0];
$total_size_excluded = pb_backupbuddy::$options['stats']['site_size_excluded'] = $result[1];
pb_backupbuddy::$options['stats']['site_size_updated'] = time();
pb_backupbuddy::save();
arsort($dir_array);
?>
<table class="widefat">
<thead>
<tr class="thead">
<?php
echo '<th>', __('Directory', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Children', 'it-l10n-backupbuddy'), '</th>', '<th>', __('Size with Exclusions', 'it-l10n-backupbuddy'), '</th>';
?>
示例13: _e
if ( data != '1' ) {
alert( '<?php _e('Error starting remote send of file to migrate', 'it-l10n-backupbuddy' ). ': ';?>' + data );
} else {
window.location.href = '<?php echo pb_backupbuddy::page_url(); ?>&destination=' + destination_id + '&destination_title=' + destination_title + '&callback_data=' + callback_data;
}
}
);
/* Try to ping server to nudge cron along since sometimes it doesnt trigger as expected. */
jQuery.post( '<?php echo admin_url('admin-ajax.php'); ?>',
function(data) {
}
);
} else {
window.location.href = '<?php echo pb_backupbuddy::page_url(); ?>&custom=remoteclient&destination_id=' + destination_id;
}
}
</script>
<style>
.graybutton {
background: url(<?php echo pb_backupbuddy::plugin_url(); ?>/images/buttons/grays2.png) top repeat-x;
min-width: 158px;
height: 138px;
display: block;
float: left;
-moz-border-radius: 6px;
示例14: __
$status .= '<a title="' . __('Backup Process Technical Details', 'it-l10n-backupbuddy') . '" href="' . pb_backupbuddy::ajax_url('backup_step_status') . '&serial=' . $backup['serial'] . '&TB_iframe=1&width=640&height=600" class="thickbox">View Technical Details</a>';
$status .= '</div>';
// Calculate finish time (if finished).
if ($backup['finish_time'] > 0) {
$finish_time = pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($backup['finish_time'])) . '<br><span class="description">' . pb_backupbuddy::$format->time_ago($backup['finish_time']) . ' ago</span>';
} else {
// unfinished.
$finish_time = '<i>Unfinished</i>';
}
// Append to list.
$backups[$backup['serial']] = array(basename($backup['archive_file']), pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($backup['start_time'])) . '<br><span class="description">' . pb_backupbuddy::$format->time_ago($backup['start_time']) . ' ago</span>', $finish_time, $backup['trigger'], $status);
$recent_backup_count++;
}
$columns = array(__('Backup', 'it-l10n-backupbuddy'), __('Started', 'it-l10n-backupbuddy'), __('Finished', 'it-l10n-backupbuddy'), __('Trigger', 'it-l10n-backupbuddy'), __('Status', 'it-l10n-backupbuddy'));
$backups = array_reverse($backups);
pb_backupbuddy::$ui->list_table($backups, array('action' => pb_backupbuddy::page_url(), 'columns' => $columns, 'css' => 'width: 100%;'));
echo '<div class="alignright actions">';
pb_backupbuddy::$ui->note('Hover over items above for additional options.');
echo '</div>';
}
// end if recent backups exist.
pb_backupbuddy::$ui->end_tab();
pb_backupbuddy::$ui->end_tabs();
/********** END TABS **********/
echo '<br /><br />';
?>
示例15: add_query_arg
if ( count( $messages[ 'errors' ] ) > 0 ) {
$errors = true;
require_once( '_step1.php' );
}
} //end add site
// Upload paths, etc.
//$upload_path = $this->get_ms_option( $blog_id, 'upload_path' );
//$fileupload_url = $this->get_ms_option( $blog_id, 'fileupload_url' );
if ( count( $messages[ 'errors' ] ) <= 0 ) :
$form_url = add_query_arg( array(
'step' => '3',
'action' => 'step3'
) , pb_backupbuddy::page_url() );
?>
<form method="post" action="<?php echo esc_url( $form_url ); ?>">
<?php wp_nonce_field( 'bbms-migration', 'pb_bbms_migrate' ); ?>
<p><?php esc_html_e( 'Please verify that you are sure you would like to import the backed up site into the just-created blank site. This import cannot be undone.','it-l10n-backupbuddy' ); ?></p>
<p>
<?php
if ( is_subdomain_install() ) {
if ( domain_exists( $blog_domain, '/', $current_blog->blog_id ) ) {
//$newdomain = $blog_domain;
$newdomain = $domain;
$path = $blog_domain . '/';
} else {
$path = $domain . '.' . preg_replace( '|^www\.|', '', $current_blog->domain );
}