mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-21 00:02:44 +00:00
Coding Standards: Use MINUTE_IN_SECONDS where appropriate.
This aims to clarify the time units for some timeout or expiration values. Follow-up to [11823], [13177], [21996], [37747]. See #55647. git-svn-id: https://develop.svn.wordpress.org/trunk@53714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b05fbba55e
commit
7573385d95
@ -40,7 +40,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
|
||||
// This class uses the timeout on a per-connection basis, others use it on a per-action basis.
|
||||
if ( ! defined( 'FS_TIMEOUT' ) ) {
|
||||
define( 'FS_TIMEOUT', 240 );
|
||||
define( 'FS_TIMEOUT', 4 * MINUTE_IN_SECONDS );
|
||||
}
|
||||
|
||||
if ( empty( $opt['port'] ) ) {
|
||||
|
||||
@ -2007,10 +2007,10 @@ function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_own
|
||||
* to allow for per-transport overriding of the default.
|
||||
*/
|
||||
if ( ! defined( 'FS_CONNECT_TIMEOUT' ) ) {
|
||||
define( 'FS_CONNECT_TIMEOUT', 30 );
|
||||
define( 'FS_CONNECT_TIMEOUT', MINUTE_IN_SECONDS / 2 );
|
||||
}
|
||||
if ( ! defined( 'FS_TIMEOUT' ) ) {
|
||||
define( 'FS_TIMEOUT', 30 );
|
||||
define( 'FS_TIMEOUT', MINUTE_IN_SECONDS / 2 );
|
||||
}
|
||||
|
||||
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ) {
|
||||
|
||||
@ -203,7 +203,7 @@ if ( $structure_updated ) {
|
||||
add_settings_error( 'general', 'settings_updated', $message, 'success' );
|
||||
}
|
||||
|
||||
set_transient( 'settings_errors', get_settings_errors(), 30 );
|
||||
set_transient( 'settings_errors', get_settings_errors(), MINUTE_IN_SECONDS / 2 );
|
||||
|
||||
wp_redirect( admin_url( 'options-permalink.php?settings-updated=true' ) );
|
||||
exit;
|
||||
|
||||
@ -344,7 +344,8 @@ if ( 'update' === $action ) { // We are saving settings sent from a settings pag
|
||||
if ( ! count( get_settings_errors() ) ) {
|
||||
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );
|
||||
}
|
||||
set_transient( 'settings_errors', get_settings_errors(), 30 );
|
||||
|
||||
set_transient( 'settings_errors', get_settings_errors(), MINUTE_IN_SECONDS / 2 );
|
||||
|
||||
// Redirect back to the settings page that was submitted.
|
||||
$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user