本文整理汇总了PHP中pb_backupbuddy::add_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::add_filter方法的具体用法?PHP pb_backupbuddy::add_filter怎么用?PHP pb_backupbuddy::add_filter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::add_filter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
pb_backupbuddy::add_ajax( 'download_archive' ); // Directory exclusions picker for settings page.
pb_backupbuddy::add_ajax( 'set_backup_note' ); // Used for setting a note on a backup archive in the backup listing.
/********** DASHBOARD (admin) **********/
// Display stats in Dashboard.
if ( ( !is_multisite() ) || ( is_multisite() && is_network_admin() ) ) { // Only show if standalon OR in main network admin.
pb_backupbuddy::add_dashboard_widget( 'stats', 'BackupBuddy', 'godmode' );
}
/********** FILTERS (admin) **********/
pb_backupbuddy::add_filter( 'plugin_row_meta', 10, 2 );
/********** PAGES (admin) **********/
if ( is_multisite() && pb_backupbuddy::$classes['core']->is_network_activated() && !defined( 'PB_DEMO_MODE' ) ) { // Multisite installation.
if ( is_network_admin() ) { // Network Admin pages
pb_backupbuddy::add_page( '', 'getting_started', array( pb_backupbuddy::settings( 'name' ), 'Getting Started' ) );
pb_backupbuddy::add_page( 'getting_started', 'backup', __( 'Backup', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'migrate_restore', __( 'Migrate, Restore', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'multisite_import', __( 'Multisite Import', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'malware_scan', __( 'Malware Scan', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'server_info', __( 'Server Information', 'it-l10n-backupbuddy' ), 'manage_network' );
//pb_backupbuddy::add_page( 'getting_started', 'server_tools', __( 'Server Tools', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'scheduling', __( 'Scheduling', 'it-l10n-backupbuddy' ), 'manage_network' );
pb_backupbuddy::add_page( 'getting_started', 'settings', __( 'Settings', 'it-l10n-backupbuddy' ), 'manage_network' );
示例2: backupbuddy_clean_transients
// Cleanup after backup.
pb_backupbuddy::add_cron('remote_send', 10, 5);
// Manual remote destination sending.
pb_backupbuddy::add_cron('destination_send', 10, 3);
// Manual remote destination sending.
// Remote destination copying. Eventually combine into one function to pass to individual remote destination classes to process.
pb_backupbuddy::add_cron('process_s3_copy', 10, 6);
pb_backupbuddy::add_cron('process_remote_copy', 10, 3);
pb_backupbuddy::add_cron('process_dropbox_copy', 10, 2);
pb_backupbuddy::add_cron('process_rackspace_copy', 10, 5);
pb_backupbuddy::add_cron('process_ftp_copy', 10, 7);
pb_backupbuddy::add_cron('housekeeping', 10, 0);
pb_backupbuddy::add_cron('process_destination_copy', 10, 3);
// New copy mechanism.
/********** FILTERS (global) **********/
pb_backupbuddy::add_filter('cron_schedules');
// Add schedule periods such as bimonthly, etc into cron. By default passes 1 param at priority 10.
if ('1' == pb_backupbuddy::$options['disable_https_local_ssl_verify']) {
$disable_local_ssl_verify_anon_function = create_function('', 'return false;');
add_filter('https_local_ssl_verify', $disable_local_ssl_verify_anon_function, 100);
}
/********** OTHER (global) **********/
// WP-CLI tool support for command line access to BackupBuddy. http://wp-cli.org/
if (defined('WP_CLI') && WP_CLI) {
include pb_backupbuddy::plugin_path() . '/classes/wp-cli.php';
}
// TODO: In the future when WordPress handles this for us, remove on WP versions where it is no longer needed.
function backupbuddy_clean_transients()
{
backupbuddy_transient_delete(true);
}