Skip to content

Commit

Permalink
Rename method to better align with what we use elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Jul 14, 2023
1 parent e3d4800 commit 59ce103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/Classifai/Providers/OpenAI/DallE.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] );
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 59ce103

Please sign in to comment.