當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pb_backupbuddy::log方法代碼示例

本文整理匯總了PHP中pb_backupbuddy::log方法的典型用法代碼示例。如果您正苦於以下問題:PHP pb_backupbuddy::log方法的具體用法?PHP pb_backupbuddy::log怎麽用?PHP pb_backupbuddy::log使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pb_backupbuddy的用法示例。


在下文中一共展示了pb_backupbuddy::log方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: versions_confirm

 /**
  * versions_confirm()
  *
  * Check the version of an item and compare it to the minimum requirements BackupBuddy requires.
  *
  * @param		string		$type		Optional. If left blank '' then all tests will be performed. Valid values: wordpress, php, ''.
  * @param		boolean		$notify		Optional. Whether or not to alert to the screen (and throw error to log) of a version issue.\
  * @return		boolean					True if the selected type is a bad version
  */
 function versions_confirm($type = '', $notify = false)
 {
     $bad_version = false;
     if ($type == 'wordpress' || $type == '') {
         global $wp_version;
         if (version_compare($wp_version, pb_backupbuddy::settings('wp_minimum'), '<=')) {
             if ($notify === true) {
                 pb_backupbuddy::alert(sprintf(__('ERROR: BackupBuddy requires WordPress version %1$s or higher. You may experience unexpected behavior or complete failure in this environment. Please consider upgrading WordPress.', 'it-l10n-backupbuddy'), $this->_wp_minimum));
                 pb_backupbuddy::log('Unsupported WordPress Version: ' . $wp_version, 'error');
             }
             $bad_version = true;
         }
     }
     if ($type == 'php' || $type == '') {
         if (version_compare(PHP_VERSION, pb_backupbuddy::settings('php_minimum'), '<=')) {
             if ($notify === true) {
                 pb_backupbuddy::alert(sprintf(__('ERROR: BackupBuddy requires PHP version %1$s or higher. You may experience unexpected behavior or complete failure in this environment. Please consider upgrading PHP.', 'it-l10n-backupbuddy'), PHP_VERSION));
                 pb_backupbuddy::log('Unsupported PHP Version: ' . PHP_VERSION, 'error');
             }
             $bad_version = true;
         }
     }
     return $bad_version;
 }
開發者ID:verbazend,項目名稱:AWFA,代碼行數:33,代碼來源:core.php

示例2: alert

 /**
  *	pb_backupbuddy::alert()
  *
  *	Displays a message to the user at the top of the page when in the dashboard.
  *
  *	@param		string		$message		Message you want to display to the user.
  *	@param		boolean		$error			OPTIONAL! true indicates this alert is an error and displays as red. Default: false
  *	@param		int			$error_code		OPTIONAL! Error code number to use in linking in the wiki for easy reference.
  *	@return		null
  */
 public function alert($message, $error = false, $error_code = '', $rel_tag = '')
 {
     $log_error = false;
     echo '<div id="message" style="padding: 9px;" rel="' . $rel_tag . '" class="pb_backupbuddy_alert ';
     if ($error === false) {
         echo 'updated fade';
     } else {
         echo 'error';
         $log_error = true;
     }
     if ($error_code != '') {
         $message .= '<a href="http://ithemes.com/codex/page/' . pb_backupbuddy::settings('name') . ':_Error_Codes#' . $error_code . '" target="_new"><i>' . pb_backupbuddy::settings('name') . ' Error Code ' . $error_code . ' - Click for more details.</i></a>';
         $log_error = true;
     }
     if ($log_error === true) {
         pb_backupbuddy::log($message . ' Error Code: ' . $error_code, 'error');
     }
     echo '" >' . $message . '</div>';
 }
開發者ID:jimlongo56,項目名稱:bhouse,代碼行數:29,代碼來源:ui.php


注:本文中的pb_backupbuddy::log方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。