Skip to content

Commit

Permalink
Improve openAI image generate process Codeinwp/feedzy-rss-feeds-pro#637
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Jan 19, 2024
1 parent 11bef88 commit aafcd00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/admin/feedzy-rss-feeds-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private function word_ai_content() {
*/
private function default_content() {
if ( ! method_exists( $this, $this->current_job->tag ) ) {
return '';
return $this->default_value;
}
return call_user_func( array( $this, $this->current_job->tag ) );
}
Expand Down Expand Up @@ -448,7 +448,7 @@ private function generate_image() {
if ( ! class_exists( '\Feedzy_Rss_Feeds_Pro_Openai' ) ) {
return isset( $this->default_value ) ? $this->default_value : '';
}
if ( ! $this->current_job->data->generateImgWithChatGPT ) {
if ( $this->current_job->data->generateImgWithChatGPT && empty( $this->default_value ) ) {
return isset( $this->default_value ) ? $this->default_value : '';
}
$openai = new \Feedzy_Rss_Feeds_Pro_Openai();
Expand Down

0 comments on commit aafcd00

Please sign in to comment.