Skip to content

Commit 208cc45

Browse files
committed
Reinstate heartbeat
Formatting
2 parents 54c231e + 1540d46 commit 208cc45

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/wp-admin/edit-form-blocks.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ static function ( $classes ) {
123123
'before'
124124
);
125125

126+
// Set Heartbeat interval to 10 seconds, used to refresh post locks.
127+
wp_add_inline_script(
128+
'heartbeat',
129+
'if ( window.wp && window.wp.heartbeat ) {
130+
window.wp.heartbeat.interval( 10 );
131+
}'
132+
);
133+
126134
/*
127135
* Get all available templates for the post/page attributes meta-box.
128136
* The "Default template" array element should only be added if the array is

src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ public function get_theme_item_permissions_check( $request ) {
531531

532532
return new WP_Error(
533533
'rest_cannot_read_global_styles',
534-
__( 'Sorry, you are not allowed to access the global styles on this site.', 'gutenberg' ),
534+
__( 'Sorry, you are not allowed to access the global styles on this site.' ),
535535
array(
536536
'status' => rest_authorization_required_code(),
537537
)
@@ -626,7 +626,7 @@ public function get_theme_items( $request ) {
626626
);
627627
}
628628

629-
$response = array();
629+
$response = array();
630630

631631
// Register theme-defined variations e.g. from block style variation partials under `/styles`.
632632
$partials = WP_Theme_JSON_Resolver::get_style_variations( 'block' );

0 commit comments

Comments
 (0)