当前位置: 首页>>代码示例>>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;未经允许,请勿转载。