Skip to content

Commit

Permalink
DB-6162: Decoupled Preview Link not working in WordPress (#43)
Browse files Browse the repository at this point in the history
* DB-6162: enqueue preview scripts after block editor assets load

* Update changelog
  • Loading branch information
backlineint committed Jun 16, 2023
1 parent 793bb4a commit 7a7e980
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ While we hope to expand in the future, the initial release of this plugin only s
== Changelog ==

** Latest **
* Bugfix for cases where Decoupled Preview link did not load due to a js error. [[#43](https://github.com/pantheon-systems/wp-decoupled-preview/pull/43)]

= 1.0.2 =
* Bugfix that prevented posts that didn't have a revision from being previewed.[[#39](https://github.com/pantheon-systems/wp-decoupled-preview/pull/39)].
Expand Down
2 changes: 1 addition & 1 deletion wp-decoupled-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function conditionally_enqueue_scripts() {

if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) {
add_action( 'admin_bar_menu', __NAMESPACE__ . '\\add_admin_decoupled_preview_link', 100 );
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\enqueue_scripts' );
add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\enqueue_scripts', 100 );
}

// We're not processing this information at all so we can bypass the nonce here.
Expand Down

0 comments on commit 7a7e980

Please sign in to comment.