本文整理汇总了PHP中pb_backupbuddy::add_page方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::add_page方法的具体用法?PHP pb_backupbuddy::add_page怎么用?PHP pb_backupbuddy::add_page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pb_backupbuddy
的用法示例。
在下文中一共展示了pb_backupbuddy::add_page方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Site
$export_title = '<span title="Note: Enabled for both subsite Admins and Network Superadmins based on BackupBuddy settings">Export Site</span>';
} else { // Settings do NOT allow admins to export; set capability for superadmins only.
$capability = 'manage_network';
$export_title = '<span title="Note: Enabled for Network Superadmins only based on BackupBuddy settings">Export Site (SA)</span>';
}
//pb_backupbuddy::add_page( '', 'getting_started', array( pb_backupbuddy::settings( 'name' ), 'Getting Started' . $export_note ), $capability );
pb_backupbuddy::add_page( '', 'multisite_export', $export_title, $capability );
}
} else { // Standalone site.
pb_backupbuddy::add_page( '', 'getting_started', array( pb_backupbuddy::settings( 'name' ), 'Getting Started' ) );
pb_backupbuddy::add_page( 'getting_started', 'backup', __( 'Backup', 'it-l10n-backupbuddy' ), 'administrator' );
pb_backupbuddy::add_page( 'getting_started', 'migrate_restore', __( 'Migrate, Restore', 'it-l10n-backupbuddy' ), 'administrator' );
pb_backupbuddy::add_page( 'getting_started', 'malware_scan', __( 'Malware Scan', 'it-l10n-backupbuddy' ), 'administrator' );
pb_backupbuddy::add_page( 'getting_started', 'server_info', __( 'Server Information', 'it-l10n-backupbuddy' ), 'administrator' );
//pb_backupbuddy::add_page( 'getting_started', 'server_tools', __( 'Server Tools', 'it-l10n-backupbuddy' ), 'administrator' );
pb_backupbuddy::add_page( 'getting_started', 'scheduling', __( 'Scheduling', 'it-l10n-backupbuddy' ), 'administrator' );
pb_backupbuddy::add_page( 'getting_started', 'settings', __( 'Settings', 'it-l10n-backupbuddy' ), 'administrator' );
}
/********** LIBRARIES & CLASSES (admin) **********/
/********** OTHER (admin) **********/
?>
示例2: __
pb_backupbuddy::add_page('multisite_export', 'malware_scan', __('Malware Scan', 'it-l10n-backupbuddy'), $capability);
}
} else {
// PB_BACKUPBUDDY_MULTISITE_EXPERIMENT not in wp-config / set to TRUE.
pb_backupbuddy::status('error', 'Multisite detected but PB_BACKUPBUDDY_MULTISITE_EXPERIMENT definition not found in wp-config.php / not defined to boolean TRUE.');
}
} else {
// Standalone site.
pb_backupbuddy::add_page('', 'backup', array(pb_backupbuddy::settings('name'), __('Backup', 'it-l10n-backupbuddy')), pb_backupbuddy::$options['role_access'], $icon);
pb_backupbuddy::add_page('backup', 'migrate_restore', __('Restore / Migrate', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
pb_backupbuddy::add_page('backup', 'destinations', __('Remote Destinations', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
//pb_backupbuddy::add_page( 'backup', 'deploy', __( 'Deployments', 'it-l10n-backupbuddy' ), pb_backupbuddy::$options['role_access'] );
pb_backupbuddy::add_page('backup', 'server_tools', __('Server Tools', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
pb_backupbuddy::add_page('backup', 'malware_scan', __('Malware Scan', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
pb_backupbuddy::add_page('backup', 'scheduling', __('Schedules', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
pb_backupbuddy::add_page('backup', 'settings', __('Settings', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
}
/********** LIBRARIES & CLASSES (admin) **********/
/********** OTHER (admin) **********/
add_filter('contextual_help', 'pb_backupbuddy_contextual_help', 10, 3);
function pb_backupbuddy_contextual_help($contextual_help, $screen_id, $screen)
{
// Loads help from file in controllers/help/:PAGENAME:.php
// WordPress pre-v3.3 so no contextual help.
if (!method_exists($screen, 'add_help_tab')) {
return $contextual_help;
}
// Not a backupbuddy page.
if (false === stristr($screen_id, 'backupbuddy')) {
return $contextual_help;
}