The post_submitbox_misc_actions
Hook in WPFTS
The post_submitbox_misc_actions
hook is a standard WordPress hook that allows adding extra elements to the “Publish” meta box on the post editing page. WPFTS uses this hook to display information about the indexing status of the current post.
What WPFTS does when post_submitbox_misc_actions
is called:
- Retrieving the indexing status: The plugin retrieves the indexing status of the current post using the
WPFTS_Core::GetPostIndexStatus()
method. - Displaying the status: WPFTS displays the indexing status as text next to a search icon. The status can be “Unknown”, “Not Indexed”, “Processing”, “Error”, or “Ok”.
Important functions involved in handling post_submitbox_misc_actions
:
WPFTS_Core::GetPostIndexStatus()
How to use this in addon development:
Addon developers can use this hook to add their own information to the “Publish” meta box. However, care should be taken not to overload the meta box with unnecessary information.
Additional notes:
- The indexing status is only displayed on the post editing page.
- The displayed status is dynamically updated using AJAX.
- The plugin code contains commented-out code for adding additional actions to the meta box, which may be used in future versions.
This hook provides developers with the ability to add their own information to the “Publish” meta box and integrate their functionality with WPFTS.