Make WordPress Core

Ticket #25073: 25073-9.patch

File 25073-9.patch, 3.0 KB (added by azaozz, 11 years ago)
  • src/wp-admin/includes/misc.php

     
    743743 *
    744744 * @since 3.8
    745745 */
    746 function wp_disable_heartbeat_suspend( $settings ) {
     746function wp_heartbeat_set_suspension( $settings ) {
    747747        global $pagenow;
    748748
    749749        if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) {
    750                 $settings['suspend'] = 'disable';
     750                $settings['suspension'] = 'disable';
    751751        }
    752752
    753753        return $settings;
    754754}
    755 add_filter( 'heartbeat_settings', 'wp_disable_heartbeat_suspend' );
     755add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
  • src/wp-admin/js/inline-edit-post.js

     
    352352}).ready( function() {
    353353        // Set the heartbeat interval to 15 sec.
    354354        if ( typeof wp !== 'undefined' && wp.heartbeat ) {
    355                 wp.heartbeat.setInterval( 15 );
     355                wp.heartbeat.interval( 15 );
    356356        }
    357357});
    358358
  • src/wp-admin/js/post.js

     
    377377       
    378378        // Set the heartbeat interval to 15 sec. if post lock dialogs are enabled
    379379        if ( typeof wp !== 'undefined' && wp.heartbeat && $('#post-lock-dialog').length ) {
    380                 wp.heartbeat.setInterval( 15 );
     380                wp.heartbeat.interval( 15 );
    381381        }
    382382
    383383        // multi-taxonomies
  • src/wp-includes/js/heartbeat.js

     
    132132                                        settings.screenId = options.screenId || 'front';
    133133                                }
    134134
    135                                 if ( options.suspend === 'disable' ) {
     135                                if ( options.suspension === 'disable' ) {
    136136                                        settings.suspendEnabled = false;
    137137                                }
    138138                        }
     
    342342
    343343                                // Do this last, can trigger the next XHR if connection time > 5 sec. and newInterval == 'fast'
    344344                                if ( newInterval ) {
    345                                         setInterval( newInterval );
     345                                        interval( newInterval );
    346346                                }
    347347                        }).fail( function( jqXHR, textStatus, error ) {
    348348                                setErrorState( textStatus || 'unknown', jqXHR.status );
     
    605605                 * @param string ticks Used with speed = 'fast' or 5, how many ticks before the interval reverts back
    606606                 * @return int Current interval in seconds
    607607                 */
    608                 function setInterval( speed, ticks ) {
     608                function interval( speed, ticks ) {
    609609                        var interval, oldInerval = settings.tempInterval ? settings.tempInterval : settings.mainInterval;
    610610
    611611                        if ( speed ) {
     
    725725                        hasFocus: hasFocus,
    726726                        connectNow: connectNow,
    727727                        disableSuspend: disableSuspend,
    728                         setInterval: setInterval,
     728                        interval: interval,
    729729                        hasConnectionError: hasConnectionError,
    730730                        enqueue: enqueue,
    731731                        dequeue: dequeue,