WordPress.org

Make WordPress Core

Changeset 28805


Ignore:
Timestamp:
06/23/14 14:30:14 (3 years ago)
Author:
SergeyBiryukov
Message:

Simplify the code for calculating plugin API check timeout.

props leewillis77.
fixes #28600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r28782 r28805  
    267267    if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 
    268268        $timeout = 30; 
    269     } elseif ( count( $plugins ) > 10 ) { 
    270         // One extra second for every 10 plugins 
     269    } else { 
     270        // Three seconds, plus one extra second for every 10 plugins 
    271271        $timeout = 3 + intval( count( $plugins ) / 10 ); 
    272     } else { 
    273         $timeout = 3; 
    274272    } 
    275273 
     
    424422    if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 
    425423        $timeout = 30; 
    426     } elseif ( count( $themes ) > 10 ) { 
    427         // One extra second for every 10 themes 
     424    } else { 
     425        // Three seconds, plus one extra second for every 10 themes 
    428426        $timeout = 3 + intval( count( $themes ) / 10 ); 
    429     } else { 
    430         $timeout = 3; 
    431427    } 
    432428 
Note: See TracChangeset for help on using the changeset viewer.