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


PHP backupbuddy_core::determineLatestVersion方法代碼示例

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


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

示例1: array

 /*
 $parent_class_test = array(
 				'title'			=>		'BackupBuddy Version',
 				'suggestion'	=>		'>= ' . pb_backupbuddy::settings( 'wp_minimum' ) . ' (latest best)',
 				'value'			=>		$wp_version,
 				'tip'			=>		__('Version of WordPress currently running. It is important to keep your WordPress up to date for security & features.', 'it-l10n-backupbuddy' ),
 			);
 if ( version_compare( $wp_version, pb_backupbuddy::settings( 'wp_minimum' ), '<=' ) ) {
 	$parent_class_test['status'] = __('FAIL', 'it-l10n-backupbuddy' );
 } else {
 	$parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy' );
 }
 array_push( $tests, $parent_class_test );
 */
 // BACKUPBUDDY VERSION
 if (false === ($latestVersion = backupbuddy_core::determineLatestVersion($bypassCache = true))) {
     $suggestion_text = '[information unavailable]';
     $latest_backupbuddy_nonminor_version = 0;
 } else {
     $latest_backupbuddy_version = $latestVersion[0];
     $latest_backupbuddy_nonminor_version = $latestVersion[1];
     $suggestion_text = $latest_backupbuddy_nonminor_version;
     if ($latest_backupbuddy_version == pb_backupbuddy::settings('version')) {
         // At absolute latest including minor.
         $suggestion_text .= ' (major version) or ' . $latest_backupbuddy_version . ' (<a href="options-general.php?page=ithemes-licensing" title="You may enable upgrading to the quick release version on the iThemes Licensing page.">quick release</a>)';
     } elseif ($latest_backupbuddy_nonminor_version != $latest_backupbuddy_version) {
         // Minor version available that is newer than latest major.
         $suggestion_text .= ' (major version) or ' . $latest_backupbuddy_version . ' (<a href="plugins.php?ithemes-updater-force-minor-update=1" title="You may enable upgrading to the quick release version on the iThemes Licensing page.">quick release version</a>; <a href="options-general.php?page=ithemes-licensing" title="Once you have licensed BackupBuddy you may select this to go to the Plugins page to upgrade to the latest quick release version. Typically only the main major versions are available for automatic updates but this option instructs the updater to display minor version updates for approximately one hour. If it does not immediately become available on the Plugins page, try refreshing a couple of times.">quick release settings</a>)';
     } else {
         $suggestion_text .= ' (latest)';
     }
開發者ID:elephantcode,項目名稱:elephantcode,代碼行數:31,代碼來源:server.php

示例2: array

 /*
 $parent_class_test = array(
 				'title'			=>		'BackupBuddy Version',
 				'suggestion'	=>		'>= ' . pb_backupbuddy::settings( 'wp_minimum' ) . ' (latest best)',
 				'value'			=>		$wp_version,
 				'tip'			=>		__('Version of WordPress currently running. It is important to keep your WordPress up to date for security & features.', 'it-l10n-backupbuddy' ),
 			);
 if ( version_compare( $wp_version, pb_backupbuddy::settings( 'wp_minimum' ), '<=' ) ) {
 	$parent_class_test['status'] = __('FAIL', 'it-l10n-backupbuddy' );
 } else {
 	$parent_class_test['status'] = __('OK', 'it-l10n-backupbuddy' );
 }
 array_push( $tests, $parent_class_test );
 */
 // BACKUPBUDDY VERSION
 if (false === ($latestVersion = backupbuddy_core::determineLatestVersion())) {
     $suggestion_text = '[information unavailable]';
     $latest_backupbuddy_nonminor_version = 0;
 } else {
     $latest_backupbuddy_version = $latestVersion[0];
     $latest_backupbuddy_nonminor_version = $latestVersion[1];
     $suggestion_text = $latest_backupbuddy_nonminor_version;
     if ($latest_backupbuddy_version == pb_backupbuddy::settings('version')) {
         // At absolute latest including minor.
         $suggestion_text .= ' (major version) or ' . $latest_backupbuddy_version . ' (<a href="options-general.php?page=ithemes-licensing" title="You may enable upgrading to the quick release version on the iThemes Licensing page.">quick release</a>)';
     } elseif ($latest_backupbuddy_nonminor_version != $latest_backupbuddy_version) {
         // Minor version available that is newer than latest major.
         $suggestion_text .= ' (major version) or ' . $latest_backupbuddy_version . ' (<a href="plugins.php?ithemes-updater-force-minor-update=1" title="You may enable upgrading to the quick release version on the iThemes Licensing page.">quick release version</a>; <a href="options-general.php?page=ithemes-licensing" title="Once you have licensed BackupBuddy you may select this to go to the Plugins page to upgrade to the latest quick release version. Typically only the main major versions are available for automatic updates but this option instructs the updater to display minor version updates for approximately one hour. If it does not immediately become available on the Plugins page, try refreshing a couple of times.">quick release settings</a>)';
     } else {
         $suggestion_text .= ' (latest)';
     }
開發者ID:emjayoh,項目名稱:bhag,代碼行數:31,代碼來源:server.php


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