本文整理汇总了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)';
}
示例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)';
}