Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Feb 2, 2024
1 parent 4c9ec00 commit e91626f
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions includes/Classifai/Providers/Watson/SavePostHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,6 @@ public function register() {
add_action( 'admin_post_classifai_classify_post', array( $this, 'classifai_classify_post' ) );
}

/**
* Check to see if we can register this class.
*
* @return bool
*/
public function can_register(): bool {

$should_register = false;
if ( $this->is_configured() && ( is_admin() || $this->is_rest_route() ) ) {
$should_register = true;
}

/**
* Filter whether ClassifAI should register this class.
*
* @since 1.8.0
* @hook classifai_should_register_save_post_handler
*
* @param {bool} $should_register Whether the class should be registered.
* @return {bool} Whether the class should be registered.
*/
$should_register = apply_filters( 'classifai_should_register_save_post_handler', $should_register );

return $should_register;
}

/**
* Check if ClassifAI is properly configured.
*
* @return bool
*/
public function is_configured(): bool {
return ! empty( get_option( 'classifai_configured' ) ) && ! empty( get_option( 'classifai_watson_nlu' )['credentials']['watson_url'] );
}

/**
* Sets the default value for the _classifai_process_content meta key.
*
Expand Down

0 comments on commit e91626f

Please sign in to comment.