本文整理汇总了PHP中pb_backupbuddy::load_script方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::load_script方法的具体用法?PHP pb_backupbuddy::load_script怎么用?PHP pb_backupbuddy::load_script使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::load_script方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
//pb_backupbuddy::load_script( 'jquery-ui-core', true ); // WP core script.
pb_backupbuddy::load_script('jquery-ui-datepicker', true);
// WP core script.
pb_backupbuddy::load_script('jquery-ui-slider', true);
// WP core script.
pb_backupbuddy::load_script('timepicker.js');
pb_backupbuddy::load_style('admin.css', false);
// Plugin-specific file.
pb_backupbuddy::load_style('jquery_smoothness.css', false);
// Plugin-specific file.
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery( '#pb_backupbuddy_first_run' ).datetimepicker({
ampm: true
});
});
</script>
<?php
pb_backupbuddy::$classes['core']->versions_confirm();
$date_format_example = 'mm/dd/yyyy hh:mm [am/pm]';
// Example date format for displaying to user.
// HANDLE SCHEDULE DELETION.
if (pb_backupbuddy::_POST('bulk_action') == 'delete_schedule') {
pb_backupbuddy::verify_nonce(pb_backupbuddy::_POST('_wpnonce'));
// Security check to prevent unauthorized deletions by posting from a remote place.
示例2: ajax_header
function ajax_header($js = true)
{
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<title>PluginBuddy</title>';
wp_print_styles('global');
wp_print_styles('wp-admin');
wp_print_styles('colors-fresh');
wp_print_styles('colors-fresh');
if ($js === true) {
wp_enqueue_script('jquery');
wp_print_scripts('jquery');
}
//echo '<link rel="stylesheet" href="' . pb_backupbuddy::plugin_url(); . '/css/admin.css" type="text/css" media="all" />';
pb_backupbuddy::load_script('admin.js', true);
pb_backupbuddy::load_style('admin.css', true);
pb_backupbuddy::load_script('tooltip.js', true);
echo '<body class="wp-core-ui">';
echo '<div style="padding: 8px; padding-left: 12px; padding-right: 12px;">';
}
示例3: 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>
示例4: die
} else {
die('Error #84537483: Invalid profile ID `' . htmlentities($requested_profile) . '`. Profile with this number was not found. Try deactivating then reactivating the plugin. If this fails please reset the plugin Settings back to Defaults from the Settings page.');
}
} else {
die('Error #85489548955. Invalid profile ID not numeric: `' . htmlentities($requested_profile) . '`.');
}
}
// Sending to remote destination after manual backup completes?
$post_backup_steps = array();
if (pb_backupbuddy::_GET('after_destination') != '' && is_numeric(pb_backupbuddy::_GET('after_destination'))) {
$destination_id = (int) pb_backupbuddy::_GET('after_destination');
if (pb_backupbuddy::_GET('delete_after') == 'true') {
$delete_after = true;
} else {
$delete_after = false;
}
$post_backup_steps = array(array('function' => 'send_remote_destination', 'args' => array($destination_id, $delete_after), 'start_time' => 0, 'finish_time' => 0, 'attempts' => 0));
pb_backupbuddy::status('details', 'Manual backup set to send to remote destination `' . $destination_id . '`. Delete after: `' . $delete_after . '`. Added to post backup function steps.');
}
pb_backupbuddy::load_script('backupEvents.js');
// Run the backup!
pb_backupbuddy::flush();
// Flush any buffer to screen just before the backup begins.
if (pb_backupbuddy::$classes['backup']->start_backup_process($profile_array, 'manual', array(), $post_backup_steps, '', $serial_override, $export_plugins) !== true) {
pb_backupbuddy::alert(__('Fatal Error #4344443: Backup failure', 'it-l10n-backupbuddy'), true);
}
?>
</div>
示例5: the
<?php
// Tutorial
pb_backupbuddy::load_script('jquery.joyride-2.0.3.js');
pb_backupbuddy::load_script('modernizr.mq.js');
pb_backupbuddy::load_style('joyride.css');
?>
<a href="" class="pb_backupbuddy_begintour">Tour This Page</a>
<ol id="pb_backupbuddy_tour" style="display: none;">
<li data-id="ui-id-1">These settings are your defaults for all backups. Profiles may be used to override many settings to customize various backups to your needs.</li>
<li data-id="ui-id-2">Use profiles to customize various settings on a case-by-case basis and override default backup settings.</li>
<li data-id="ui-id-3">Customize advanced options or troubleshoot issues by overriding functionality or changing default operation.</li>
<li data-class="jQueryOuterTree">Database tables may be omitted from backups by hovering over a table in the list and clicking the (-) minus symbol.</li>
<li data-id="exlude_dirs" data-button="Finish">Directories & files may be omitted from backups by hovering over an item in the list and clicking the (-) minus symbol.</li>
</ol>
<script>
jQuery(window).load(function() {
jQuery( '.pb_backupbuddy_begintour' ).click( function() {
jQuery("#pb_backupbuddy_tour").joyride({
tipLocation: 'top',
});
return false;
});
});
</script>
<?php
pb_backupbuddy::$ui->title('BackupBuddy Settings');
pb_backupbuddy::$classes['core']->versions_confirm();
$data = array();
// To pass to view.
示例6: jQuery
<?php
// TODO: The entire remote destination picking / editing system is still loving in the pre-framework architecture. Migrate it.
pb_backupbuddy::load_style('admin');
pb_backupbuddy::load_script('jquery');
pb_backupbuddy::load_script('admin.js', true);
// pbframework version due to second param.
pb_backupbuddy::load_script('admin.js');
pb_backupbuddy::load_style('admin.css', true);
// pbframework version due to second param.
pb_backupbuddy::load_script('tooltip.js', true);
// pbframework version due to second param.
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#pluginbuddy-tabs").tabs();
jQuery('.pb_backupbuddy_selectdestination').click(function(e) {
var win = window.dialogArguments || opener || parent || top;
win.pb_backupbuddy_selectdestination( jQuery(this).attr( 'href' ), jQuery(this).attr( 'alt' ), '<?php
if (!empty($_GET['callback_data'])) {
echo $_GET['callback_data'];
}
?>
' );
win.tb_remove();
return false;
});
});
</script>
示例7:
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8" dir="ltr" lang="en-US">
<![endif]-->
<!--[if !(IE 8) ]><!-->
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<!--<![endif]-->
<head>
<title>BackupBuddy importbuddy.php by PluginBuddy.com</title>
<meta name="robots" content="noindex">
<?php
pb_backupbuddy::load_style('style.css');
pb_backupbuddy::load_script('jquery.js');
pb_backupbuddy::load_script('ui.core.js');
pb_backupbuddy::load_script('ui.widget.js');
pb_backupbuddy::load_script('ui.tabs.js');
pb_backupbuddy::load_script('tooltip.js');
pb_backupbuddy::load_script('importbuddy.js');
?>
</head>
<?php
if (pb_backupbuddy::$options['display_mode'] == 'normal') {
echo '<body>';
echo '<center><img src="importbuddy/images/bb-logo.png" title="BackupBuddy Restoration & Migration Tool" style="margin-top: 10px;"></center><br>';
} else {
// Magic migration mode inside WordPress (in an iframe).
echo '<body onLoad="window.parent.scroll(0,0);">';
// Auto scroll to top of parent while in iframe.
}
//<a href="http://ithemes.com/codex/page/BackupBuddy" style="text-decoration: none;">Need help? See the <b>Knowledge Base</b> for tutorials & more.</a><br>
?>
<center>
示例8: rollback
public function rollback()
{
pb_backupbuddy::$ui->ajax_header();
pb_backupbuddy::load_script('jquery');
echo '<div id="pb_backupbuddy_working" style="width: 100px; margin-bottom: 30px;"><br><center><img src="' . pb_backupbuddy::plugin_url() . '/images/working.gif" title="Working... Please wait as this may take a moment..."></center></div>';
?>
<script>
function pb_status_append( status_string ) {
var win = window.dialogArguments || opener || parent || top;
win.pb_status_append( status_string );
}
function pb_status_undourl( undo_url ) {
var win = window.dialogArguments || opener || parent || top;
win.pb_status_undourl( undo_url );
}
var win = window.dialogArguments || opener || parent || top;
win.window.scrollTo(0,0);
</script>
<?php
global $pb_backupbuddy_js_status;
$pb_backupbuddy_js_status = true;
pb_backupbuddy::set_status_serial('restore');
$step = strip_tags(pb_backupbuddy::_GET('step'));
if ('' == $step || !is_numeric($step)) {
$step = 0;
}
$backupFile = strip_tags(pb_backupbuddy::_GET('archive'));
if ('' == $backupFile) {
pb_backupbuddy::alert('The backup file to restore from must be specified.');
die;
}
$stepFile = pb_backupbuddy::plugin_path() . '/controllers/pages/rollback/_step' . $step . '.php';
if (!file_exists($stepFile)) {
pb_backupbuddy::alert('Error #849743. Invalid roll back step `' . htmlentities(pb_backupbuddy::_GET('step')) . '` (' . $step . ').');
die;
}
require $stepFile;
echo '<br><br><br>';
echo '<script type="text/javascript">jQuery("#pb_backupbuddy_working").hide();</script>';
pb_backupbuddy::$ui->ajax_footer();
pb_backupbuddy::flush();
die;
}
示例9: ajax_header
function ajax_header($js = true, $padding = true)
{
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<title>PluginBuddy</title>';
wp_print_styles('wp-admin');
wp_print_styles('dashicons');
wp_print_styles('buttons');
wp_print_styles('colors');
if ($js === true) {
wp_enqueue_script('jquery');
wp_print_scripts('jquery');
}
pb_backupbuddy::load_style('wp-admin.css');
echo '<style>
.form-table input[type=radio],.form-table input[type=checkbox] {
width: 16px;
height: 16px;
}
.form-table input[type=checkbox]:checked:before {
margin: -7px;
}
.form-table input[type=radio]:checked:before {
margin: 3px;
}
</style>';
//echo '<link rel="stylesheet" href="' . pb_backupbuddy::plugin_url(); . '/css/admin.css" type="text/css" media="all" />';
pb_backupbuddy::load_script('admin.js', true);
pb_backupbuddy::load_style('admin.css', true);
pb_backupbuddy::load_script('tooltip.js', true);
echo '<body class="wp-core-ui">';
if ($padding === true) {
echo '<div style="padding: 8px; padding-left: 12px; padding-right: 12px;">';
} else {
echo '<div>';
}
}
示例10: __call
function __call($name, $arguments)
{
$page_file = pb_backupbuddy::plugin_path() . '/controllers/pages/' . $name . '.php';
if ($name == 'getting_started') {
$page_file = pb_backupbuddy::plugin_path() . '/pluginbuddy/_' . $name . '.php';
}
if (file_exists($page_file)) {
// Load from /controllers/pages/PAGE.php if it exists.
// Display page.
pb_backupbuddy::load_script('admin.js', true);
pb_backupbuddy::load_style('admin.css', true);
pb_backupbuddy::load_script('tooltip.js', true);
echo '<div class="wrap">';
require_once $page_file;
echo '</div>';
echo '<div id="footer-thankyou" style="float: right; color: #777; margin-right: 21px; margin-top: 20px; margin-bottom: -34px;">Running BackupBuddy v' . pb_backupbuddy::settings('version') . '.</div>';
} else {
// Not found
echo '{Missing pages method `' . $name . '`.}';
}
}
示例11: jQuery
<?php
// TODO: The entire remote destination picking / editing system is still loving in the pre-framework architecture. Migrate it.
pb_backupbuddy::load_style( 'admin' );
pb_backupbuddy::load_script( 'jquery' );
pb_backupbuddy::load_script( 'admin.js', true ); // pbframework version due to second param.
pb_backupbuddy::load_script( 'admin.js' );
pb_backupbuddy::load_style( 'admin.css', true ); // pbframework version due to second param.
pb_backupbuddy::load_script( 'tooltip.js', true ); // pbframework version due to second param.
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#pluginbuddy-tabs").tabs();
jQuery('.pb_backupbuddy_selectdestination').click(function(e) {
var win = window.dialogArguments || opener || parent || top;
win.pb_backupbuddy_selectdestination( jQuery(this).attr( 'href' ), jQuery(this).attr( 'alt' ), '<?php if ( !empty( $_GET['callback_data'] ) ) { echo $_GET['callback_data']; } ?>' );
win.tb_remove();
return false;
});
});
</script>
<?php
// Handle duplication.
if ( pb_backupbuddy::_GET( 'duplicate' ) != '' ) {
if ( !isset( pb_backupbuddy::$options['remote_destinations'][pb_backupbuddy::_GET( 'duplicate' )] ) ) {
pb_backupbuddy::alert( 'Invalid destination ID to duplicate.' );
示例12: __call
function __call($name, $arguments)
{
$page_file = pb_backupbuddy::plugin_path() . '/controllers/pages/' . $name . '.php';
if ($name == 'getting_started') {
$page_file = pb_backupbuddy::plugin_path() . '/pluginbuddy/_' . $name . '.php';
}
if (file_exists($page_file)) {
// Load from /controllers/pages/PAGE.php if it exists.
//pb_backupbuddy::load();
//pb_backupbuddy::init_class_controller(); // Adds ui controller if it doesnt exist yet. EDIT: now handled in pb_backupbuddy::__construct().
// Display page.
pb_backupbuddy::load_script('admin.js', true);
pb_backupbuddy::load_style('admin.css', true);
pb_backupbuddy::load_script('tooltip.js', true);
echo '<div class="wrap">';
require_once $page_file;
echo '</div>';
// After page.
if (pb_backupbuddy::$options['log_level'] == '3' || defined('PB_DEBUG') && PB_DEBUG === true) {
pb_backupbuddy::debug();
}
} else {
// Not found
echo '{Missing pages method `' . $name . '`.}';
}
}
示例13: deploy
public function deploy()
{
pb_backupbuddy::$ui->ajax_header();
pb_backupbuddy::load_script('jquery');
echo '<div id="pb_backupbuddy_working" style="width: 100px; margin-bottom: 30px;"><br><center><img src="' . pb_backupbuddy::plugin_url() . '/images/working.gif" title="Working... Please wait as this may take a moment..."></center></div>';
?>
<script>
function pb_status_append( status_string ) {
var win = window.dialogArguments || opener || parent || top;
win.pb_status_append( status_string );
}
function pb_status_undourl( undo_url ) {
var win = window.dialogArguments || opener || parent || top;
win.pb_status_undourl( undo_url );
}
var win = window.dialogArguments || opener || parent || top;
win.window.scrollTo(0,0);
</script>
<?php
global $pb_backupbuddy_js_status;
$pb_backupbuddy_js_status = true;
pb_backupbuddy::set_status_serial('deploy');
$step = strip_tags(pb_backupbuddy::_GET('step'));
if (!ctype_alnum($step)) {
die('Error #8549845: Invalid step `' . htmlentities($step) . '`.');
}
$stepFile = pb_backupbuddy::plugin_path() . '/controllers/pages/deploy/_' . $step . '.php';
if (!file_exists($stepFile)) {
pb_backupbuddy::alert('Error #3298238. Invalid deploy step `' . htmlentities(pb_backupbuddy::_GET('step')) . '` (' . $step . ').');
die;
}
require $stepFile;
echo '<br><br><br>';
echo '<script type="text/javascript">jQuery("#pb_backupbuddy_working").hide();</script>';
pb_backupbuddy::$ui->ajax_footer();
pb_backupbuddy::flush();
die;
}
示例14: function
<?php
pb_backupbuddy::load_script('icicle.js');
pb_backupbuddy::load_script('icicle_setup.js');
pb_backupbuddy::load_style('jit_base.css');
pb_backupbuddy::load_style('jit_icicle.css');
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#pb_iciclelaunch').click(function(e) {
jQuery('#pb_infovis_container').slideToggle();
jQuery.post( '<?php
echo pb_backupbuddy::ajax_url('icicle');
?>
',
function( data ) {
jQuery('#infovis').html('');
icicle_init( data );
}
);
});
jQuery( '.pb_backupbuddy_site_size_listing_button' ).click( function() {
jQuery( '#pb_backupbuddy_site_size_listing_intro > .pb_backupbuddy_loading' ).show();
jQuery.post( '<?php
echo pb_backupbuddy::ajax_url('site_size_listing');
?>
',
function( data ) {
jQuery( '#pb_backupbuddy_site_size_listing_content' ).html( data );
jQuery( '#pb_backupbuddy_site_size_listing_intro > .pb_backupbuddy_loading' ).hide();
示例15: htmlentities
$picker_url = pb_backupbuddy::ajax_url('destination_picker');
}
if (pb_backupbuddy::_GET('action_verb') != '') {
$action_verb = ' ' . htmlentities(pb_backupbuddy::_GET('action_verb'));
} else {
// default
$action_verb = '';
}
pb_backupbuddy::load_style('admin');
pb_backupbuddy::load_style('destination_picker.css');
pb_backupbuddy::load_script('jquery');
pb_backupbuddy::load_script('jquery-ui-core');
pb_backupbuddy::load_script('jquery-ui-widget');
// Load accordion JS. Pre WP v3.3 we need to load our own JS file. Was: pb_backupbuddy::load_script( 'jquery-ui-accordion' );
global $wp_version;
pb_backupbuddy::load_script(version_compare($wp_version, '3.3', '<') ? 'jquery.ui.accordion.min.js' : 'jquery-ui-accordion');
// Destinations may hide the add and test buttons by altering these variables.
global $pb_hide_save;
global $pb_hide_test;
$pb_hide_save = false;
$pb_hide_test = false;
// Load destinations class.
require_once pb_backupbuddy::plugin_path() . '/destinations/bootstrap.php';
?>
<script>
jQuery(document).ready(function() {