Closed vaurdan closed 1 month ago
The new change introduces a rest_api_init
action hook in the wp-parsely.php
file to call the parsely_content_helper_editor_sidebar_features
function. This enhancement extends the plugin’s functionalities to initialize during the REST API setup, potentially allowing for more dynamic interactions and seamless integration with the content editor sidebar.
Files | Change Summary |
---|---|
wp-parsely.php |
Added rest_api_init action hook for invoking parsely_content_helper_editor_sidebar_features function during REST API setup. |
sequenceDiagram
participant W as WordPress
participant P as wp-parsely.php
participant F as parsely_content_helper_editor_sidebar_features
W->>P: Initialize REST API
P->>W: Add rest_api_init Hook
W->>P: Execute rest_api_init Hook
P->>F: Invoke parsely_content_helper_editor_sidebar_features
F->>P: Functionality executed
P->>W: REST API ready with extra features
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks for fixing this. Since we're now calling it in rest_api_init
, do we also need the call inadmin_init
?
@acicovic yeah, I believe so, so that the initialization also happens on wp-admin and not only just on the REST API.
Description
This PR is a follow up of #2578. The Content Helper features also need to be initialized on
rest_api_init
, otherwise the custom post type and taxonomies for the Smart Linking feature will not be available in the REST API context.Motivation and context
Fixes a bug where the Smart Linking
/get
endpoint does not return any smart links because thesmart_link_source
taxonomy does not exists.How has this been tested?
Tested locally, and validated that the Smart Linking endpoint returns the expected results.
Summary by CodeRabbit
rest_api_init
action, improving content management capabilities in the editor sidebar.