Skip to content

Commit

Permalink
Merge pull request #2179 from Parsely/fix/excerpt-generator-initializ…
Browse files Browse the repository at this point in the history
…ation-hook

PCH Excerpt Generator: Fix wrong initialization of the module
  • Loading branch information
acicovic authored Feb 1, 2024
2 parents 5c95dc7 + daedca6 commit 3445bef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wp-parsely.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ function init_content_helper_editor_sidebar(): void {

require_once __DIR__ . '/src/content-helper/excerpt-generator/class-excerpt-generator.php';

add_action( 'init', __NAMESPACE__ . '\\init_content_helper_excerpt_generator' );
// The priority of 9 is used to ensure that the Excerpt Generator is loaded before the PCH Editor Sidebar (10).
add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\init_content_helper_excerpt_generator', 9 );
/**
* Initializes and inserts the PCH Excerpt Generator.
*
Expand Down

0 comments on commit 3445bef

Please sign in to comment.