You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement related to a problem? Please describe.
Currently, there is no hook / filter to enable content classification based on $post_status; content classification can only be processed where a post is actually published.
// Only process published, supported items and only if features are enabled
if ( 'publish' === $post_status && in_array( $post_type, $supported, true ) && \Classifai\language_processing_features_enabled() ) {
$this->classify( $post_id );
}
Describe the solution you'd like
An additional filter; which allows an array of post statuses to be used. This will allow (for example) a post with post status draft to be processed (prior to publication).
Designs
N/A - functional changes only
Describe alternatives you've considered
Externally, the Classifai\Admin\SavePostHandler class could be extended to allow the same change.
The text was updated successfully, but these errors were encountered:
Left comments on the PR but to capture those here as well, I think we can copy how we do the supported post types, by adding a new helper method to get the supported post stati with a filter there. We could also add these as options to our settings page, which might be nice.
Is your enhancement related to a problem? Please describe.
Currently, there is no hook / filter to enable content classification based on
$post_status
; content classification can only be processed where a post is actually published.https://github.com/10up/classifai/blob/develop/includes/Classifai/Admin/SavePostHandler.php#L66
Describe the solution you'd like
An additional filter; which allows an array of post statuses to be used. This will allow (for example) a post with post status
draft
to be processed (prior to publication).Designs
N/A - functional changes only
Describe alternatives you've considered
Externally, the
Classifai\Admin\SavePostHandler
class could be extended to allow the same change.The text was updated successfully, but these errors were encountered: