Skip to content

Commit

Permalink
Reinstate heartbeat
Browse files Browse the repository at this point in the history
Formatting
  • Loading branch information
ramonjd committed Sep 13, 2024
2 parents 54c231e + 1540d46 commit 208cc45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ static function ( $classes ) {
'before'
);

// Set Heartbeat interval to 10 seconds, used to refresh post locks.
wp_add_inline_script(
'heartbeat',
'if ( window.wp && window.wp.heartbeat ) {
window.wp.heartbeat.interval( 10 );
}'
);

/*
* Get all available templates for the post/page attributes meta-box.
* The "Default template" array element should only be added if the array is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ public function get_theme_item_permissions_check( $request ) {

return new WP_Error(
'rest_cannot_read_global_styles',
__( 'Sorry, you are not allowed to access the global styles on this site.', 'gutenberg' ),
__( 'Sorry, you are not allowed to access the global styles on this site.' ),
array(
'status' => rest_authorization_required_code(),
)
Expand Down Expand Up @@ -626,7 +626,7 @@ public function get_theme_items( $request ) {
);
}

$response = array();
$response = array();

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

0 comments on commit 208cc45

Please sign in to comment.