diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 01f28bd08f..6097bc2036 100644
a
|
b
|
function wp_die( $message = '', $title = '', $args = array() ) { |
3725 | 3725 | * @param string|WP_Error $message Error message or WP_Error object. |
3726 | 3726 | * @param string $title Optional. Error title. Default empty. |
3727 | 3727 | * @param string|array $args Optional. Arguments to control behavior. Default empty array. |
| 3728 | * |
| 3729 | * @global int|false $upgrading The upgrade time from `.maintenance` file. |
3728 | 3730 | */ |
3729 | 3731 | function _default_wp_die_handler( $message, $title = '', $args = array() ) { |
3730 | 3732 | list( $message, $title, $parsed_args ) = _wp_die_process_input( $message, $title, $args ); |
… |
… |
function _default_wp_die_handler( $message, $title = '', $args = array() ) { |
3898 | 3900 | box-shadow: none; |
3899 | 3901 | } |
3900 | 3902 | |
| 3903 | progress { |
| 3904 | width: 100%; |
| 3905 | } |
| 3906 | |
3901 | 3907 | <?php |
3902 | 3908 | if ( 'rtl' === $text_direction ) { |
3903 | 3909 | echo 'body { font-family: Tahoma, Arial; }'; |
… |
… |
function _default_wp_die_handler( $message, $title = '', $args = array() ) { |
3908 | 3914 | <body id="error-page"> |
3909 | 3915 | <?php endif; // ! did_action( 'admin_head' ) ?> |
3910 | 3916 | <?php echo $message; ?> |
| 3917 | |
| 3918 | <?php |
| 3919 | /** |
| 3920 | * Filters the default value of the maintenance page refresh interval. |
| 3921 | * |
| 3922 | * In browsers that support Javascript, the maintenance page will be automatically refreshed |
| 3923 | * with this interval. If set to 0, the page will not be refreshed. |
| 3924 | * |
| 3925 | * @since Unkown |
| 3926 | * |
| 3927 | * @param int $period The refresh interval in seconds (defaults 10). |
| 3928 | */ |
| 3929 | $refresh_period = apply_filters( 'wp_maintenance_mode_refresh_period', 10 ); |
| 3930 | $refresh_period = absint( $refresh_period ); |
| 3931 | |
| 3932 | $refresh_text = __( 'The page will automatically refresh when maintenance is over.' ); |
| 3933 | |
| 3934 | global $upgrading; |
| 3935 | if ( ! empty( $upgrading ) && $refresh_period ) : ?> |
| 3936 | |
| 3937 | <div id="progress" style='display: none;'> |
| 3938 | <progress indeterminate></progress> |
| 3939 | <p><?php echo $refresh_text; ?></p> |
| 3940 | </div> |
| 3941 | |
| 3942 | <script> |
| 3943 | document.getElementById('progress').style.display = 'block'; |
| 3944 | const period = <?php echo $refresh_period; ?>; |
| 3945 | setTimeout(function() { |
| 3946 | window.location.reload(true); |
| 3947 | }, period * 1000); |
| 3948 | </script> |
| 3949 | |
| 3950 | <?php endif; ?> |
3911 | 3951 | </body> |
3912 | 3952 | </html> |
3913 | 3953 | <?php |