mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
Coding Standards: Clarify time units for various timeout or expiration values.
This changeset implements a clearer and more consistent timeout/duration/expiration format. It updates time durations used in various files, as per WordPress coding standards: - If the value can be represented as an integer (not a fractional) number of minutes (hours, etc.), use the appropriate constant (e.g.: `MINUTE_IN_SECONDS`) multiplied by that number. - Otherwise, keep the value as is and add a comment with the units for clarity. Follow-up to [11823], [13177], [21996], [37747], [53714]. Props hztyfoon, audrasjb, arrasel403, krupalpanchal, GaryJ, SergeyBiryukov, peterwilsoncc, rudlinkon, costdev, robinwpdeveloper. Fixes #56293. See #55647. git-svn-id: https://develop.svn.wordpress.org/trunk@54113 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -405,7 +405,7 @@ function wp_update_plugins( $extra_stats = array() ) {
|
||||
$locales = array_unique( $locales );
|
||||
|
||||
if ( $doing_cron ) {
|
||||
$timeout = 30;
|
||||
$timeout = 30; // 30 seconds.
|
||||
} else {
|
||||
// Three seconds, plus one extra second for every 10 plugins.
|
||||
$timeout = 3 + (int) ( count( $plugins ) / 10 );
|
||||
@@ -687,7 +687,7 @@ function wp_update_themes( $extra_stats = array() ) {
|
||||
$locales = array_unique( $locales );
|
||||
|
||||
if ( $doing_cron ) {
|
||||
$timeout = 30;
|
||||
$timeout = 30; // 30 seconds.
|
||||
} else {
|
||||
// Three seconds, plus one extra second for every 10 themes.
|
||||
$timeout = 3 + (int) ( count( $themes ) / 10 );
|
||||
|
||||
Reference in New Issue
Block a user