当前位置: 首页>>代码示例>>PHP>>正文


PHP pb_backupbuddy::add_dashboard_widget方法代码示例

本文整理汇总了PHP中pb_backupbuddy::add_dashboard_widget方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::add_dashboard_widget方法的具体用法?PHP pb_backupbuddy::add_dashboard_widget怎么用?PHP pb_backupbuddy::add_dashboard_widget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pb_backupbuddy的用法示例。


在下文中一共展示了pb_backupbuddy::add_dashboard_widget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: size

pb_backupbuddy::add_ajax( 'refresh_database_size' ); // Server info page database size update.
pb_backupbuddy::add_ajax( 'refresh_database_size_excluded' ); // Server info page site size (sans exclusions) update.
pb_backupbuddy::add_ajax( 'phpinfo' ); // Server info page extended PHPinfo thickbox.
pb_backupbuddy::add_ajax( 'exclude_tree' ); // Directory exclusions picker for settings page.
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' );
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:init_admin.php

示例2: add_action

// FTP destination path picker.
pb_backupbuddy::add_ajax('rollback');
// Database roll back feature.
pb_backupbuddy::add_ajax('deploy');
// Database roll back feature.
pb_backupbuddy::add_ajax('getMainLog');
// Output main log file text.
// Register BackupBuddy API. As of BackupBuddy v5.0. Access credentials will be checked within callback.
add_action('wp_ajax_backupbuddy_api', array(pb_backupbuddy::$_ajax, 'api'));
add_action('wp_ajax_nopriv_backupbuddy_api', array(pb_backupbuddy::$_ajax, 'api'));
/********** DASHBOARD (admin) **********/
// Display stats in Dashboard.
//if ( pb_backupbuddy::$options['dashboard_stats'] == '1' ) {
if (!is_multisite() || is_multisite() && is_network_admin()) {
    // Only show if standalon OR in main network admin.
    pb_backupbuddy::add_dashboard_widget('stats', 'BackupBuddy v' . pb_backupbuddy::settings('version'), 'godmode');
}
//}
/********** FILTERS (admin) **********/
pb_backupbuddy::add_filter('plugin_row_meta', 10, 2);
/********** PAGES (admin) **********/
$icon = '';
if (is_multisite() && backupbuddy_core::is_network_activated() && !defined('PB_DEMO_MODE')) {
    // Multisite installation.
    if (defined('PB_BACKUPBUDDY_MULTISITE_EXPERIMENT') && PB_BACKUPBUDDY_MULTISITE_EXPERIMENT == TRUE) {
        // comparing with bool but loose so string is acceptable.
        if (is_network_admin()) {
            // Network Admin pages
            pb_backupbuddy::add_page('', 'backup', array(pb_backupbuddy::settings('name'), __('Backup', 'it-l10n-backupbuddy')), 'manage_network', $icon);
            pb_backupbuddy::add_page('backup', 'migrate_restore', __('Migrate, Restore', 'it-l10n-backupbuddy'), 'manage_network');
            pb_backupbuddy::add_page('backup', 'destinations', __('Remote Destinations', 'it-l10n-backupbuddy'), pb_backupbuddy::$options['role_access']);
开发者ID:adrianjonmiller,项目名称:vadsupplies,代码行数:31,代码来源:init_admin.php


注:本文中的pb_backupbuddy::add_dashboard_widget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。