From 59ce10398cccb386d95c8e34b324a14dbf9646db Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Fri, 14 Jul 2023 14:06:16 -0600 Subject: [PATCH] Rename method to better align with what we use elsewhere --- includes/Classifai/Providers/OpenAI/DallE.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Classifai/Providers/OpenAI/DallE.php b/includes/Classifai/Providers/OpenAI/DallE.php index a8d37983f..7147d6523 100644 --- a/includes/Classifai/Providers/OpenAI/DallE.php +++ b/includes/Classifai/Providers/OpenAI/DallE.php @@ -57,7 +57,7 @@ public function __construct( $service ) { * This only fires if can_register returns true. */ public function register() { - if ( $this->can_generate_image() ) { + if ( $this->is_feature_enabled() ) { add_action( 'admin_menu', [ $this, 'register_generate_media_page' ], 0 ); add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_scripts' ] ); add_action( 'print_media_templates', [ $this, 'print_media_templates' ] ); @@ -518,7 +518,7 @@ public function generate_image_callback( string $prompt = '', array $args = [] ) * * @return bool */ - public function can_generate_image() { + public function is_feature_enabled() { $settings = $this->get_settings(); // Check if the current user has permission to generate images.